add plain-text support for user page

yhy
Dawn_Ocean 2024-03-07 11:32:37 +08:00
parent a5aa10d6f4
commit 34c3753d2c
3 changed files with 53 additions and 8 deletions

View File

@ -5,6 +5,7 @@ import type CustomTabBar from '../../custom-tab-bar';
import './user.scss';
import { AtList, AtListItem } from 'taro-ui';
import PageFooter from '@/components/PageFooter/PageFooter';
import pt from '@/plain-text';
export default class UserPage extends Component {
// 以下是TabBar相关
@ -44,30 +45,30 @@ export default class UserPage extends Component {
<View>
<AtList>
<AtListItem
title='我的工单'
note='在这里查看历史工单!'
title={pt.get().userPage.ticketColumn.title}
note={pt.get().userPage.ticketColumn.note}
arrow='right'
iconInfo={{ size: 25, color: '#E69966', value: 'clock' }}
onClick={this.myTicketPage}
/>
<AtListItem
title='我的信息'
note='能帮助亦可更好地找到你哦!'
title={pt.get().userPage.infoColumn.title}
note={pt.get().userPage.infoColumn.note}
arrow='right'
iconInfo={{ size: 25, color: '#78A4FA', value: 'user' }}
onClick={this.informPage}
/>
<AtListItem
title='设置'
note='配置小程序'
title={pt.get().userPage.settingsColumn.title}
note={pt.get().userPage.settingsColumn.note}
extraText=''
arrow='right'
iconInfo={{ size: 25, color: '#808080', value: 'filter' }}
onClick={this.settingsPage}
/>
<AtListItem
title='意见反馈'
note='有什么想说的都可以告诉我们哦!'
title={pt.get().userPage.reportColumn.title}
note={pt.get().userPage.reportColumn.note}
extraText=''
arrow='right'
iconInfo={{ size: 25, color: '#9ACD32', value: 'message' }}

View File

@ -0,0 +1,41 @@
export interface UserPageText {
mainTitleLine: string;
subTitleLine: string;
ticketColumn: {
title: string;
note: string;
};
infoColumn: {
title: string;
note: string;
};
settingsColumn: {
title: string;
note: string;
};
reportColumn: {
title: string;
note: string;
};
}
export const userPageZhCn: UserPageText = {
mainTitleLine: '您好这里是E志者协会',
subTitleLine: '维修请至【东三-204】实验室',
ticketColumn: {
title: '我的工单',
note: '在这里查看历史工单!',
},
infoColumn: {
title: '我的信息',
note: '能帮助亦可更好地找到你哦!',
},
settingsColumn: {
title: '应用设置',
note: '在这里配置小程序',
},
reportColumn: {
title: '意见反馈',
note: '有什么想说的都可以告诉亦可哦!',
},
};

View File

@ -1,14 +1,17 @@
import { PageFooterText, pageFooterZhCn } from './PageFooter';
import { MainPageText, mainPageZhCn } from './MainPage';
import { UserPageText, userPageZhCn } from './UserPage';
interface TextRecord {
pageFooter: PageFooterText;
mainPage: MainPageText;
userPage: UserPageText;
}
const textZhCn: TextRecord = {
pageFooter: pageFooterZhCn,
mainPage: mainPageZhCn,
userPage: userPageZhCn,
};
// type Lang = 'zh_CN' | 'en_US' | ...;