diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 27bd490..cd38f4e 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -255,7 +255,9 @@ export default class MainPage extends Component<{}, MainPageState> { className='at-article__h3' style={{ marginBottom: '20rpx', fontWeight: 'bold' }} > - {memberPage.ticketList.hint} + {(this.state.fixList.length === 0 + ? memberPage.ticketList.nohint + : '') + memberPage.ticketList.hint} {fixListRenderer} diff --git a/src/plain-text/MemberPage.ts b/src/plain-text/MemberPage.ts index 505e86c..5183615 100644 --- a/src/plain-text/MemberPage.ts +++ b/src/plain-text/MemberPage.ts @@ -58,6 +58,7 @@ export interface MemberPageText { stepList: Array<{ title: string }>; tipsList: Array<{ title: string }>; ticketList: { + nohint: string; hint: string; title: string; note: string; @@ -147,6 +148,7 @@ export const memberPageZhCn: MemberPageText = { { title: '螺丝上了吗?电源排线插了吗?' }, ], ticketList: { + nohint: '暂无', hint: '七日内未完成工单', title: '预填写工单列表', note: '在这里查看所有的预填写工单!', @@ -241,6 +243,7 @@ export const memberPageEnUs: MemberPageText = { { title: 'Are the screws on? Is the power cable plugged in?' }, ], ticketList: { + nohint: 'N/A ', hint: 'Uncompleted tickets in 7 days', title: 'Pre-filling ticket list', note: 'Browse for all pre-filling tickets here!', diff --git a/src/service/ticketList.ts b/src/service/ticketList.ts index bb0b11f..16c022a 100644 --- a/src/service/ticketList.ts +++ b/src/service/ticketList.ts @@ -28,7 +28,7 @@ export function getTicketList(that: TicketListPage) { } that.setState({ rs: former.trans(true), - fixList: data.data.map( + fixList: data.list.map( (item: { id: number; device: string;