From 079afea2e01d7c292bb30483d440a86aed5c99ed Mon Sep 17 00:00:00 2001 From: Dawn1Ocean <1785590531@qq.com> Date: Mon, 25 Mar 2024 22:43:23 +0800 Subject: [PATCH] add ticketList in mainpage --- src/assets/icons/MainPage/clock.svg | 1 + src/pages/index/index.tsx | 29 +++++++++++++++++++++++++++-- src/plain-text/MainPage.ts | 13 +++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 src/assets/icons/MainPage/clock.svg diff --git a/src/assets/icons/MainPage/clock.svg b/src/assets/icons/MainPage/clock.svg new file mode 100644 index 0000000..15c9031 --- /dev/null +++ b/src/assets/icons/MainPage/clock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index f6a7ba6..7a64573 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -1,7 +1,15 @@ import { View } from '@tarojs/components'; import { Component, ReactNode } from 'react'; import Taro from '@tarojs/taro'; -import { AtCard, AtAccordion, AtInputNumber, AtButton, AtList } from 'taro-ui'; +import { + AtCard, + AtAccordion, + AtInputNumber, + AtButton, + AtList, + AtListItem, +} from 'taro-ui'; +import clockIcon from '@/assets/icons/MainPage/clock.svg'; import type CustomTabBar from '@/custom-tab-bar'; import PageFooter from '@/components/PageFooter/PageFooter'; import pt from '@/plain-text'; @@ -165,6 +173,12 @@ export default class MainPage extends Component<{}, MainPageState> { }, submitInterval); } + ticketListPage() { + Taro.navigateTo({ + url: '/pages/user/report/report', + }); + } + render(): ReactNode { const mainPage = pt.get().mainPage; const memberPage = pt.get().memberPage; @@ -238,7 +252,18 @@ export default class MainPage extends Component<{}, MainPageState> { /> {wechatUser.getAccess() ? ( - {fixListRenderer} + + {fixListRenderer} + + + + ) : ( )} diff --git a/src/plain-text/MainPage.ts b/src/plain-text/MainPage.ts index 020de75..2ca04d6 100644 --- a/src/plain-text/MainPage.ts +++ b/src/plain-text/MainPage.ts @@ -23,6 +23,11 @@ export interface MainPageText { stepList: Array<{ title: string }>; tipsList: Array<{ title: string }>; + ticketList: { + title: string; + note: string; + }; + dutyCard: { offDuty: { title: string; @@ -71,6 +76,10 @@ export const mainPageZhCn: MainPageText = { { title: '204 也是实验室,请勿在内饮食~' }, { title: '我们是志愿服务,不收取任何礼物哦~' }, ], + ticketList: { + title: '预填写工单列表', + note: '在这里查看所有的预填写工单!', + }, dutyCard: { offDuty: { title: '未值班', @@ -132,6 +141,10 @@ export const mainPageEnUs: MainPageText = { { title: '204 is also a laboratory. Do not eat inside.' }, { title: 'We are volunteers and do not take any gifts.' }, ], + ticketList: { + title: '预填写工单列表', + note: '在这里查看所有的预填写工单!', + }, dutyCard: { offDuty: { title: 'Off Duty',