Merge branch 'yhy' into dev
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
import { Component, ReactNode } from 'react';
|
||||
import { View } from '@tarojs/components';
|
||||
import Taro from '@tarojs/taro';
|
||||
import pt from '@/plain-text';
|
||||
import './about.scss';
|
||||
|
||||
export default class SettingsPage extends Component {
|
||||
componentDidMount(): void {
|
||||
Taro.setNavigationBarTitle({
|
||||
title: pt.get().navBar.user.about,
|
||||
});
|
||||
}
|
||||
render(): ReactNode {
|
||||
return <View></View>;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,13 @@ export default class InformPage extends Component {
|
||||
isLoading: false,
|
||||
isDisable: false,
|
||||
};
|
||||
|
||||
componentDidMount(): void {
|
||||
Taro.setNavigationBarTitle({
|
||||
title: pt.get().navBar.user.inform,
|
||||
});
|
||||
}
|
||||
|
||||
handleChangePhone(phone: string) {
|
||||
this.setState({
|
||||
phone: phone,
|
||||
|
||||
@@ -14,6 +14,11 @@ export default class MemberPage extends Component {
|
||||
isLoading: false,
|
||||
isDisable: false,
|
||||
};
|
||||
componentDidMount(): void {
|
||||
Taro.setNavigationBarTitle({
|
||||
title: pt.get().navBar.user.member,
|
||||
});
|
||||
}
|
||||
handleChangeStuid(stuid: string) {
|
||||
this.setState({
|
||||
stuid: stuid,
|
||||
|
||||
@@ -14,6 +14,7 @@ import './myTicket.scss';
|
||||
type FixStatus = 1 | 2 | 3 | 4 | 5;
|
||||
|
||||
class TicketListItem {
|
||||
id: number;
|
||||
brand: string;
|
||||
model: string;
|
||||
status: FixStatus;
|
||||
@@ -21,11 +22,13 @@ class TicketListItem {
|
||||
iconMap: Map<FixStatus, string>;
|
||||
|
||||
constructor(
|
||||
id: number,
|
||||
brand: string,
|
||||
model: string,
|
||||
status: FixStatus,
|
||||
createAt: moment.Moment,
|
||||
) {
|
||||
this.id = id;
|
||||
this.brand = brand;
|
||||
this.model = model;
|
||||
this.status = status;
|
||||
@@ -48,6 +51,11 @@ class TicketListItem {
|
||||
extraText={tl.statusMap.get(this.status)}
|
||||
arrow='right'
|
||||
thumb={this.iconMap.get(this.status)}
|
||||
onClick={() => {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/TicketDetail/TicketDetail?id=' + this.id,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -57,10 +65,13 @@ export default class SettingsPage extends Component {
|
||||
state = {
|
||||
loading: true,
|
||||
success: false,
|
||||
fixList: [new TicketListItem('华硕', '天选3', 3, moment())],
|
||||
fixList: [new TicketListItem(0, '', '', 1, moment())],
|
||||
};
|
||||
|
||||
componentDidMount(): void {
|
||||
Taro.setNavigationBarTitle({
|
||||
title: pt.get().navBar.user.myTicket,
|
||||
});
|
||||
Taro.request({
|
||||
url: getUrl('/user/mytickets'),
|
||||
method: 'GET',
|
||||
@@ -82,6 +93,7 @@ export default class SettingsPage extends Component {
|
||||
fixList: res.data.data.list.map(
|
||||
item =>
|
||||
new TicketListItem(
|
||||
item.id,
|
||||
item.device,
|
||||
item.deviceModel,
|
||||
item.status,
|
||||
|
||||
@@ -13,6 +13,13 @@ export default class SettingsPage extends Component {
|
||||
isLoading: false,
|
||||
isDisable: false,
|
||||
};
|
||||
|
||||
componentDidMount(): void {
|
||||
Taro.setNavigationBarTitle({
|
||||
title: pt.get().navBar.user.report,
|
||||
});
|
||||
}
|
||||
|
||||
handleChange(report: string) {
|
||||
this.setState({
|
||||
report,
|
||||
|
||||
Reference in New Issue
Block a user