Compare commits
No commits in common. "e1c3b464a661f56102d9f75d7ce853997108e2aa" and "5bafff52ad344145be48d712b2297bd2feb75f4d" have entirely different histories.
e1c3b464a6
...
5bafff52ad
|
|
@ -5,7 +5,7 @@
|
|||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"proseWrap": "preserve",
|
||||
"arrowParens": "always",
|
||||
"arrowParens": "avoid",
|
||||
"bracketSpacing": true,
|
||||
"jsxSingleQuote": true,
|
||||
"endOfLine": "auto"
|
||||
|
|
|
|||
|
|
@ -12,4 +12,5 @@
|
|||
"isConfirmed": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -176,9 +176,9 @@ export default class RepairPage extends Component<{}, RepairPageState> {
|
|||
clear
|
||||
required
|
||||
name='deviceModel'
|
||||
title={pt.get().repairPage.deviceModelText.title}
|
||||
title={pt.get().repairPage.deviceText.title}
|
||||
type='text'
|
||||
placeholder={pt.get().repairPage.deviceModelText.placeholder}
|
||||
placeholder={pt.get().repairPage.deviceText.placeholder}
|
||||
value={this.state.deviceModel}
|
||||
onChange={this.handleDeviceModelChange.bind(this)}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -46,14 +46,14 @@ export default class MemberPage extends Component {
|
|||
passwd: this.state.passwd,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
.then(res => {
|
||||
console.log(res.data);
|
||||
Taro.atMessage({
|
||||
message: pt.get().button.loginText.success,
|
||||
type: 'success',
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
Taro.atMessage({
|
||||
message: pt.get().button.loginText.error + err.toString(),
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export default class MyTicketPage extends Component<{}, MyTicketState> {
|
|||
if (!this.state.rs.success) {
|
||||
return <View>Failed</View>;
|
||||
}
|
||||
const fixListRenderer = this.state.fixList.map((item) => item.render());
|
||||
const fixListRenderer = this.state.fixList.map(item => item.render());
|
||||
return (
|
||||
<View>
|
||||
<AtList>{fixListRenderer}</AtList>
|
||||
|
|
|
|||
|
|
@ -39,14 +39,14 @@ export default class ReportPage extends Component {
|
|||
report: this.state.report,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
.then(res => {
|
||||
console.log(res.data);
|
||||
Taro.atMessage({
|
||||
message: pt.get().button.submitText.success,
|
||||
type: 'success',
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
Taro.atMessage({
|
||||
message: pt.get().button.submitText.error + err.toString(),
|
||||
|
|
|
|||
|
|
@ -74,12 +74,12 @@ export const mainPageZhCn: MainPageText = {
|
|||
dutyCard: {
|
||||
offDuty: {
|
||||
title: '未值班',
|
||||
reason: (s) => '值班停止原因:' + s,
|
||||
recoverTime: (t) => '恢复值班时间:' + t,
|
||||
reason: s => '值班停止原因:' + s,
|
||||
recoverTime: t => '恢复值班时间:' + t,
|
||||
},
|
||||
inDuty: {
|
||||
title: '值班中',
|
||||
currentDutyText: (c) => {
|
||||
currentDutyText: c => {
|
||||
switch (c) {
|
||||
case 'off':
|
||||
return '当前未值班';
|
||||
|
|
@ -91,7 +91,7 @@ export const mainPageZhCn: MainPageText = {
|
|||
return '第三班 18:00-20:30';
|
||||
}
|
||||
},
|
||||
inDutyCnt: (n) => '当前值班人数:' + n,
|
||||
inDutyCnt: n => '当前值班人数:' + n,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -133,12 +133,12 @@ export const mainPageEnUs: MainPageText = {
|
|||
dutyCard: {
|
||||
offDuty: {
|
||||
title: '未值班',
|
||||
reason: (s) => '值班停止原因:' + s,
|
||||
recoverTime: (t) => '恢复值班时间:' + t,
|
||||
reason: s => '值班停止原因:' + s,
|
||||
recoverTime: t => '恢复值班时间:' + t,
|
||||
},
|
||||
inDuty: {
|
||||
title: '值班中',
|
||||
currentDutyText: (c) => {
|
||||
currentDutyText: c => {
|
||||
switch (c) {
|
||||
case 'off':
|
||||
return '当前未值班';
|
||||
|
|
@ -150,7 +150,7 @@ export const mainPageEnUs: MainPageText = {
|
|||
return '第三班 18:00-20:30';
|
||||
}
|
||||
},
|
||||
inDutyCnt: (n) => '当前值班人数:' + n,
|
||||
inDutyCnt: n => '当前值班人数:' + n,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export interface NavBarTitle {
|
|||
};
|
||||
}
|
||||
|
||||
export const navBarTitleZhCn: NavBarTitle = {
|
||||
export const navBarTitleZhCh: NavBarTitle = {
|
||||
ticketDetail: '工单详情',
|
||||
user: {
|
||||
myTicket: '我的工单',
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ export const ticketDetailZhCn: TicketDetailText = {
|
|||
|
||||
export const ticketDetailEnUs: TicketDetailText = {
|
||||
stepItems: [
|
||||
{ title: 'Created' },
|
||||
{ title: 'Ticket created' },
|
||||
{ title: 'Repairing' },
|
||||
{ title: 'Take home' },
|
||||
{ title: 'Finished' },
|
||||
{ title: 'Retrived' },
|
||||
],
|
||||
createTicketMessage: 'Created ticket',
|
||||
statusModifyPrefix: 'Modified repair status to: ',
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export interface TicketListText {
|
|||
}
|
||||
|
||||
export const ticketListZhCn: TicketListText = {
|
||||
createdAt: (time) => {
|
||||
createdAt: time => {
|
||||
return '创建于' + ' ' + time;
|
||||
},
|
||||
statusMap: new Map([
|
||||
|
|
@ -19,7 +19,7 @@ export const ticketListZhCn: TicketListText = {
|
|||
};
|
||||
|
||||
export const ticketListEnUs: TicketListText = {
|
||||
createdAt: (time) => {
|
||||
createdAt: time => {
|
||||
return '创建于' + ' ' + time;
|
||||
},
|
||||
statusMap: new Map([
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { AboutPageText, aboutPageEnUs, aboutPageZhCn } from './AboutPage';
|
|||
import { ButtonText, buttonEnUs, buttonZhCn } from './Button';
|
||||
import { MemberPageText, memberPageEnUs, memberPageZhCn } from './MemberPage';
|
||||
import { TicketListText, ticketListEnUs, ticketListZhCn } from './TicketList';
|
||||
import { NavBarTitle, navBarTitleEnUs, navBarTitleZhCn } from './NavBarTitle';
|
||||
import { NavBarTitle, navBarTitleEnUs, navBarTitleZhCh } from './NavBarTitle';
|
||||
import { RepairPageText, repairPageEnUs, repairPageZhCn } from './RepairPage';
|
||||
import {
|
||||
TicketDetailText,
|
||||
|
|
@ -46,7 +46,7 @@ const textZhCn: TextRecord = {
|
|||
button: buttonZhCn,
|
||||
memberPage: memberPageZhCn,
|
||||
ticketList: ticketListZhCn,
|
||||
navBar: navBarTitleZhCn,
|
||||
navBar: navBarTitleZhCh,
|
||||
repairPage: repairPageZhCn,
|
||||
ticketDetail: ticketDetailZhCn,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export function getDutyInfo(that: MainPage) {
|
|||
token: 'token_test',
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
.then(res => {
|
||||
const data = res.data.data;
|
||||
if (data.isInDuty) {
|
||||
that.setState({
|
||||
|
|
@ -30,7 +30,7 @@ export function getDutyInfo(that: MainPage) {
|
|||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
that.setState({
|
||||
dutyData: {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export function setLocaleData(lang: Lang) {
|
|||
token: 'token_test',
|
||||
lang: lang,
|
||||
},
|
||||
}).then((res) => {
|
||||
}).then(res => {
|
||||
console.log(res.data);
|
||||
});
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ export function getLocaleData() {
|
|||
data: {
|
||||
token: 'token_test',
|
||||
},
|
||||
}).then((res) => {
|
||||
}).then(res => {
|
||||
console.log(res.data);
|
||||
pt.setLang(res.data.data.lang);
|
||||
Taro.reLaunch({
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export function getMyTicketList(that: MyTicketPage) {
|
|||
token: 'token_test',
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
.then(res => {
|
||||
if (!res.data.success) {
|
||||
that.setState({
|
||||
rs: {
|
||||
|
|
@ -28,7 +28,7 @@ export function getMyTicketList(that: MyTicketPage) {
|
|||
success: true,
|
||||
},
|
||||
fixList: res.data.data.list.map(
|
||||
(item) =>
|
||||
item =>
|
||||
new TicketListItem(
|
||||
item.id,
|
||||
item.device,
|
||||
|
|
@ -39,7 +39,7 @@ export function getMyTicketList(that: MyTicketPage) {
|
|||
),
|
||||
});
|
||||
})
|
||||
.catch((reason) => {
|
||||
.catch(reason => {
|
||||
that.setState({
|
||||
rs: {
|
||||
loading: false,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export function submitTicket(that: RepairPage) {
|
|||
accessories: that.state.checkedList,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
.then(res => {
|
||||
console.log(res.data);
|
||||
that.setState({
|
||||
isLoading: false,
|
||||
|
|
@ -31,7 +31,7 @@ export function submitTicket(that: RepairPage) {
|
|||
type: 'success',
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
that.setState({
|
||||
isLoading: false,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export function getTicketInfo(that: TicketDetail, id: number) {
|
|||
id: id,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
.then(res => {
|
||||
let former = that.state.rs;
|
||||
if (!res.data.success) {
|
||||
that.setState({
|
||||
|
|
@ -30,7 +30,7 @@ export function getTicketInfo(that: TicketDetail, id: number) {
|
|||
status: data.status,
|
||||
};
|
||||
const notes: Array<TicketNote> = [];
|
||||
data.notes.map((item) => {
|
||||
data.notes.map(item => {
|
||||
notes.push({
|
||||
id: item.id,
|
||||
op: item.op,
|
||||
|
|
@ -46,7 +46,7 @@ export function getTicketInfo(that: TicketDetail, id: number) {
|
|||
});
|
||||
}
|
||||
})
|
||||
.catch((reason) => {
|
||||
.catch(reason => {
|
||||
let former = that.state.rs;
|
||||
that.setState({
|
||||
rs: former.trans(false),
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export function updateUserInfo(that: InformPage) {
|
|||
phone: that.state.phone,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
.then(res => {
|
||||
console.log(res.data);
|
||||
that.setState({
|
||||
isLoading: false,
|
||||
|
|
@ -26,7 +26,7 @@ export function updateUserInfo(that: InformPage) {
|
|||
type: 'success',
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
that.setState({
|
||||
isLoading: false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue