Compare commits
No commits in common. "d5b8af7d7b162d327dce67e61edc983dfba2e27b" and "7aaad7563f3533698c85d132c326833a68c9c79d" have entirely different histories.
d5b8af7d7b
...
7aaad7563f
|
|
@ -3,7 +3,6 @@
|
||||||
"projectname": "EVA-Notify",
|
"projectname": "EVA-Notify",
|
||||||
"setting": {
|
"setting": {
|
||||||
"compileHotReLoad": true,
|
"compileHotReLoad": true,
|
||||||
"urlCheck": false,
|
"urlCheck": false
|
||||||
"bigPackageSizeSupport": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -9,7 +9,6 @@ export default defineAppConfig({
|
||||||
'pages/user/about/about',
|
'pages/user/about/about',
|
||||||
'pages/user/report/report',
|
'pages/user/report/report',
|
||||||
'pages/user/member/member',
|
'pages/user/member/member',
|
||||||
'pages/TicketDetail/TicketDetail',
|
|
||||||
],
|
],
|
||||||
window: {
|
window: {
|
||||||
backgroundTextStyle: 'light',
|
backgroundTextStyle: 'light',
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
export default definePageConfig({
|
|
||||||
usingComponents: {},
|
|
||||||
});
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
import { Component, ReactNode } from 'react';
|
|
||||||
import { View } from '@tarojs/components';
|
|
||||||
import { getCurrentInstance } from '@tarojs/runtime';
|
|
||||||
import Taro from '@tarojs/taro';
|
|
||||||
import pt from '@/plain-text';
|
|
||||||
|
|
||||||
export default class TicketDetail extends Component {
|
|
||||||
state = {
|
|
||||||
id: 0,
|
|
||||||
};
|
|
||||||
componentDidMount(): void {
|
|
||||||
const navBar = pt.get().navBar;
|
|
||||||
Taro.setNavigationBarTitle({
|
|
||||||
title: navBar.ticketDetail,
|
|
||||||
});
|
|
||||||
const { router } = getCurrentInstance();
|
|
||||||
const id = router?.params.id;
|
|
||||||
this.setState({
|
|
||||||
id: id,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
render(): ReactNode {
|
|
||||||
return <View>TicketDetail: {this.state.id}</View>;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +1,8 @@
|
||||||
import { Component, ReactNode } from 'react';
|
import { Component, ReactNode } from 'react';
|
||||||
import { View } from '@tarojs/components';
|
import { View } from '@tarojs/components';
|
||||||
import Taro from '@tarojs/taro';
|
|
||||||
import pt from '@/plain-text';
|
|
||||||
import './about.scss';
|
import './about.scss';
|
||||||
|
|
||||||
export default class SettingsPage extends Component {
|
export default class SettingsPage extends Component {
|
||||||
componentDidMount(): void {
|
|
||||||
Taro.setNavigationBarTitle({
|
|
||||||
title: pt.get().navBar.user.about,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
render(): ReactNode {
|
render(): ReactNode {
|
||||||
return <View></View>;
|
return <View></View>;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,6 @@ export default class InformPage extends Component {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
isDisable: false,
|
isDisable: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount(): void {
|
|
||||||
Taro.setNavigationBarTitle({
|
|
||||||
title: pt.get().navBar.user.inform,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
handleChangePhone(phone: string) {
|
handleChangePhone(phone: string) {
|
||||||
this.setState({
|
this.setState({
|
||||||
phone: phone,
|
phone: phone,
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,6 @@ export default class MemberPage extends Component {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
isDisable: false,
|
isDisable: false,
|
||||||
};
|
};
|
||||||
componentDidMount(): void {
|
|
||||||
Taro.setNavigationBarTitle({
|
|
||||||
title: pt.get().navBar.user.member,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
handleChangeStuid(stuid: string) {
|
handleChangeStuid(stuid: string) {
|
||||||
this.setState({
|
this.setState({
|
||||||
stuid: stuid,
|
stuid: stuid,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import './myTicket.scss';
|
||||||
type FixStatus = 1 | 2 | 3 | 4 | 5;
|
type FixStatus = 1 | 2 | 3 | 4 | 5;
|
||||||
|
|
||||||
class TicketListItem {
|
class TicketListItem {
|
||||||
id: number;
|
|
||||||
brand: string;
|
brand: string;
|
||||||
model: string;
|
model: string;
|
||||||
status: FixStatus;
|
status: FixStatus;
|
||||||
|
|
@ -22,13 +21,11 @@ class TicketListItem {
|
||||||
iconMap: Map<FixStatus, string>;
|
iconMap: Map<FixStatus, string>;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
id: number,
|
|
||||||
brand: string,
|
brand: string,
|
||||||
model: string,
|
model: string,
|
||||||
status: FixStatus,
|
status: FixStatus,
|
||||||
createAt: moment.Moment,
|
createAt: moment.Moment,
|
||||||
) {
|
) {
|
||||||
this.id = id;
|
|
||||||
this.brand = brand;
|
this.brand = brand;
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this.status = status;
|
this.status = status;
|
||||||
|
|
@ -51,11 +48,6 @@ class TicketListItem {
|
||||||
extraText={tl.statusMap.get(this.status)}
|
extraText={tl.statusMap.get(this.status)}
|
||||||
arrow='right'
|
arrow='right'
|
||||||
thumb={this.iconMap.get(this.status)}
|
thumb={this.iconMap.get(this.status)}
|
||||||
onClick={() => {
|
|
||||||
Taro.navigateTo({
|
|
||||||
url: '/pages/TicketDetail/TicketDetail?id=' + this.id,
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -65,13 +57,10 @@ export default class SettingsPage extends Component {
|
||||||
state = {
|
state = {
|
||||||
loading: true,
|
loading: true,
|
||||||
success: false,
|
success: false,
|
||||||
fixList: [new TicketListItem(0, '', '', 1, moment())],
|
fixList: [new TicketListItem('华硕', '天选3', 3, moment())],
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount(): void {
|
componentDidMount(): void {
|
||||||
Taro.setNavigationBarTitle({
|
|
||||||
title: pt.get().navBar.user.myTicket,
|
|
||||||
});
|
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: getUrl('/user/mytickets'),
|
url: getUrl('/user/mytickets'),
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
|
@ -93,7 +82,6 @@ export default class SettingsPage extends Component {
|
||||||
fixList: res.data.data.list.map(
|
fixList: res.data.data.list.map(
|
||||||
item =>
|
item =>
|
||||||
new TicketListItem(
|
new TicketListItem(
|
||||||
item.id,
|
|
||||||
item.device,
|
item.device,
|
||||||
item.deviceModel,
|
item.deviceModel,
|
||||||
item.status,
|
item.status,
|
||||||
|
|
|
||||||
|
|
@ -13,13 +13,6 @@ export default class SettingsPage extends Component {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
isDisable: false,
|
isDisable: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount(): void {
|
|
||||||
Taro.setNavigationBarTitle({
|
|
||||||
title: pt.get().navBar.user.report,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
handleChange(report: string) {
|
handleChange(report: string) {
|
||||||
this.setState({
|
this.setState({
|
||||||
report,
|
report,
|
||||||
|
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
export interface NavBarTitle {
|
|
||||||
ticketDetail: string;
|
|
||||||
user: {
|
|
||||||
myTicket: string;
|
|
||||||
report: string;
|
|
||||||
member: string;
|
|
||||||
inform: string;
|
|
||||||
about: string;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export const navBarTitleZhCh: NavBarTitle = {
|
|
||||||
ticketDetail: '工单详情',
|
|
||||||
user: {
|
|
||||||
myTicket: '我的工单',
|
|
||||||
report: '意见反馈',
|
|
||||||
inform: '我的信息',
|
|
||||||
about: '关于我们',
|
|
||||||
member: '协会成员登录',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export const navBarTitleEnUs: NavBarTitle = {
|
|
||||||
ticketDetail: 'Ticket Detail',
|
|
||||||
user: {
|
|
||||||
myTicket: 'My Tickets',
|
|
||||||
report: 'Report',
|
|
||||||
inform: 'Information',
|
|
||||||
about: 'About us',
|
|
||||||
member: 'Member login',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
@ -8,7 +8,6 @@ import { AboutPageText, aboutPageEnUs, aboutPageZhCn } from './AboutPage';
|
||||||
import { ButtonText, buttonEnUs, buttonZhCn } from './Button';
|
import { ButtonText, buttonEnUs, buttonZhCn } from './Button';
|
||||||
import { MemberPageText, memberPageEnUs, memberPageZhCn } from './MemberPage';
|
import { MemberPageText, memberPageEnUs, memberPageZhCn } from './MemberPage';
|
||||||
import { TicketListText, ticketListEnUs, ticketListZhCn } from './TicketList';
|
import { TicketListText, ticketListEnUs, ticketListZhCn } from './TicketList';
|
||||||
import { NavBarTitle, navBarTitleEnUs, navBarTitleZhCh } from './NavBarTitle';
|
|
||||||
|
|
||||||
interface TextRecord {
|
interface TextRecord {
|
||||||
pageFooter: PageFooterText;
|
pageFooter: PageFooterText;
|
||||||
|
|
@ -21,7 +20,6 @@ interface TextRecord {
|
||||||
button: ButtonText;
|
button: ButtonText;
|
||||||
memberPage: MemberPageText;
|
memberPage: MemberPageText;
|
||||||
ticketList: TicketListText;
|
ticketList: TicketListText;
|
||||||
navBar: NavBarTitle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const textZhCn: TextRecord = {
|
const textZhCn: TextRecord = {
|
||||||
|
|
@ -35,7 +33,6 @@ const textZhCn: TextRecord = {
|
||||||
button: buttonZhCn,
|
button: buttonZhCn,
|
||||||
memberPage: memberPageZhCn,
|
memberPage: memberPageZhCn,
|
||||||
ticketList: ticketListZhCn,
|
ticketList: ticketListZhCn,
|
||||||
navBar: navBarTitleZhCh,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const textEnUs: TextRecord = {
|
const textEnUs: TextRecord = {
|
||||||
|
|
@ -49,7 +46,6 @@ const textEnUs: TextRecord = {
|
||||||
button: buttonEnUs,
|
button: buttonEnUs,
|
||||||
memberPage: memberPageEnUs,
|
memberPage: memberPageEnUs,
|
||||||
ticketList: ticketListEnUs,
|
ticketList: ticketListEnUs,
|
||||||
navBar: navBarTitleEnUs,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// type Lang = 'zh_CN' | 'en_US' | ...;
|
// type Lang = 'zh_CN' | 'en_US' | ...;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue