From 590db1f3fda26f0697e00c29bc7133ccd80d65ea Mon Sep 17 00:00:00 2001 From: Dawn_Ocean Date: Thu, 9 May 2024 17:08:56 +0800 Subject: [PATCH] fix: add space in my continuing tickets; dutyinfo data process --- src/pages/repair/repair.tsx | 47 +++++++++++++++++++------------------ src/service/dutyInfo.ts | 6 ++--- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/pages/repair/repair.tsx b/src/pages/repair/repair.tsx index b4755ff..d6d7b48 100644 --- a/src/pages/repair/repair.tsx +++ b/src/pages/repair/repair.tsx @@ -194,29 +194,30 @@ export default class RepairPage extends Component<{}, RepairPageState> { {pt.get().repairPage.currentTicket.hint} {this.state.currentTicketsIdName.map((pair, idx) => ( - { - Taro.navigateTo({ - url: - '/pages/TicketDetail/TicketDetail?id=' + - pair.keys().next().value, - }); - }} - note={ - pt.get().tips.tipsText[ - randomInt(0, pt.get().tips.tipsText.length - 1) - ] - } - > - - + + { + Taro.navigateTo({ + url: + '/pages/TicketDetail/TicketDetail?id=' + + pair.keys().next().value, + }); + }} + note={ + pt.get().tips.tipsText[ + randomInt(0, pt.get().tips.tipsText.length - 1) + ] + } + > + + + ))} ) : ( diff --git a/src/service/dutyInfo.ts b/src/service/dutyInfo.ts index a8216fc..1683b3b 100644 --- a/src/service/dutyInfo.ts +++ b/src/service/dutyInfo.ts @@ -28,14 +28,14 @@ export function getDutyInfo(that: MainPage) { if (!data.isInDuty) { that.setState({ dutyData: { - ...that.state.dutyData, + ...data, offDutyReason: pt.get().common.offDutyReason, }, }); if (data.currentDuty === '0') { that.setState({ dutyData: { - ...that.state.dutyData, + ...data, place: pt.get().common.place, offDutyReason: pt.get().common.offDutyReason, dutyRecoverTime: pt.get().common.dutyRecoverTime, @@ -45,7 +45,7 @@ export function getDutyInfo(that: MainPage) { } else { that.setState({ dutyData: { - ...that.state.dutyData, + ...data, place: pt.get().common.place, }, });