Compare commits

...

13 Commits

Author SHA1 Message Date
Dawn_Ocean ac23f88cdd add member login mock 2024-03-11 14:03:23 +08:00
Dawn_Ocean e1e998628f remove reset button from inform page 2024-03-11 13:55:54 +08:00
Dawn_Ocean 806e7a393c add member login page 2024-03-11 13:52:09 +08:00
Dawn_Ocean fd6a60d1d3 add route for memberlogin page 2024-03-11 11:59:12 +08:00
Dawn_Ocean 36a9a35886 add member login entry in user page 2024-03-11 11:58:12 +08:00
Dawn_Ocean dd770b8ece add inform page request 2024-03-08 22:45:40 +08:00
Dawn_Ocean b174304d74 fix mock file structure 2024-03-08 22:27:13 +08:00
Dawn_Ocean 88cdb6cb92 add report request 2024-03-08 21:44:21 +08:00
Dawn_Ocean 00977db512 add locale request 2024-03-08 21:24:08 +08:00
Dawn_Ocean 1907f1e967 optimize userpage layout 2024-03-08 16:41:53 +08:00
Dawn_Ocean 39dd945020 optimize pagefooter layout 2024-03-08 16:32:05 +08:00
Dawn_Ocean b603ad24b3 add logo & version in user page 2024-03-08 15:51:27 +08:00
Dawn_Ocean dd07c1da10 add mock apis 2024-03-08 14:56:48 +08:00
21 changed files with 36498 additions and 36104 deletions

View File

@ -1,8 +1,54 @@
import mytickets from './mytickets.json';
import ticketInfo from './ticketInfo.json';
export default {
'GET /testdata': {
'GET /dutyinfo': {
success: true,
data: {
test: 'test',
token: 'token_test',
isInDuty: true,
inDutyCnt: 3,
currentDuty: '2',
},
},
'GET /user/info': {
success: true,
data: {
token: 'token_test',
name: '马保国',
phone: 13333333333,
},
},
'POST /user/update': {
data: {},
},
'GET /user/locale/get': {
success: true,
data: {
lang: 'en_US',
},
},
'POST /user/locale/update': {
data: {},
},
'POST /report': {
data: {},
},
'GET /user/mytickets': {
success: true,
data: mytickets,
},
'GET /tickets/info/': {
success: true,
data: ticketInfo,
},
'POST /tickets/newcomment': {
data: {},
},
'POST /tickets/create': {
data: {},
},
'POST /member/login': {
data: {},
},
};

View File

@ -0,0 +1,15 @@
{
"list": [
{
"id": 6830,
"type": 1,
"status": 5,
"device": "主机",
"deviceModel": "技嘉",
"owner": "武技栏",
"phone": "18888888888",
"createdTime": "2024-03-06T19:49:27.043865",
"isConfirmed": false
}
]
}

View File

@ -0,0 +1,49 @@
{
"id": 6847,
"type": 1,
"device": "华硕",
"deviceModel": "灵耀X14",
"owner": "唐姐姐",
"phone": "15555555555",
"description": "清灰",
"workers": [],
"createdTime": "2024-03-07T19:52:48.523303",
"status": 5,
"isConfirmed": false,
"notes": [
{
"avatar": "https://....jpg",
"id": 21368,
"op": "宇航员",
"type": 0,
"content": "",
"createdTime": "2024-03-07T19:52:48.523305"
},
{
"avatar": "https://....jpg",
"id": 21370,
"op": "宇航员",
"type": 2,
"content": "1",
"createdTime": "2024-03-07T19:58:27.838816"
},
{
"avatar": "https://....jpg",
"id": 21373,
"op": "宇航员",
"type": 2,
"content": "4",
"createdTime": "2024-03-07T20:28:12.070707"
},
{
"avatar": "https://....jpg",
"id": 21374,
"op": "宇航员",
"type": 2,
"content": "5",
"createdTime": "2024-03-07T20:30:15.770486"
}
],
"accessories": [2],
"picked": false
}

71840
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,103 +1,103 @@
{
"name": "eva-notify",
"version": "1.0.0",
"private": true,
"description": "A Wechat miniprogram project of EVA platform",
"templateInfo": {
"name": "default",
"typescript": true,
"css": "Sass",
"framework": "React"
},
"scripts": {
"build:weapp": "taro build --type weapp",
"build:swan": "taro build --type swan",
"build:alipay": "taro build --type alipay",
"build:tt": "taro build --type tt",
"build:h5": "taro build --type h5",
"build:rn": "taro build --type rn",
"build:qq": "taro build --type qq",
"build:jd": "taro build --type jd",
"build:quickapp": "taro build --type quickapp",
"build:harmony-hybrid": "taro build --type harmony-hybrid",
"dev:weapp": "npm run build:weapp -- --watch --mode dev",
"dev:swan": "npm run build:swan -- --watch",
"dev:alipay": "npm run build:alipay -- --watch",
"dev:tt": "npm run build:tt -- --watch",
"dev:h5": "npm run build:h5 -- --watch",
"dev:rn": "npm run build:rn -- --watch",
"dev:qq": "npm run build:qq -- --watch",
"dev:jd": "npm run build:jd -- --watch",
"dev:quickapp": "npm run build:quickapp -- --watch",
"dev:harmony-hybrid": "npm run build:harmony-hybrid -- --watch",
"test": "jest",
"prepare": "husky install"
},
"browserslist": [
"last 3 versions",
"Android >= 4.1",
"ios >= 8"
],
"author": "",
"dependencies": {
"@babel/runtime": "^7.21.5",
"@tarojs/components": "3.6.24",
"@tarojs/helper": "3.6.24",
"@tarojs/plugin-framework-react": "3.6.24",
"@tarojs/plugin-platform-alipay": "3.6.24",
"@tarojs/plugin-platform-harmony-hybrid": "3.6.24",
"@tarojs/plugin-platform-jd": "3.6.24",
"@tarojs/plugin-platform-qq": "3.6.24",
"@tarojs/plugin-platform-swan": "3.6.24",
"@tarojs/plugin-platform-tt": "3.6.24",
"@tarojs/plugin-platform-weapp": "3.6.24",
"@tarojs/react": "3.6.24",
"@tarojs/runtime": "3.6.24",
"@tarojs/shared": "3.6.24",
"@tarojs/taro": "3.6.24",
"process": "^0.11.10",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"taro-ui": "^3.3.0"
},
"devDependencies": {
"@babel/core": "^7.8.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
"@tarojs/cli": "3.6.24",
"@tarojs/plugin-mock": "^0.0.9",
"@tarojs/plugin-platform-h5": "^3.6.24",
"@tarojs/taro-loader": "3.6.24",
"@tarojs/test-utils-react": "^0.1.1",
"@tarojs/webpack5-runner": "3.6.24",
"@types/jest": "^29.3.1",
"@types/node": "^18.15.11",
"@types/react": "^18.0.0",
"@types/sass": "^1.43.1",
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"babel-preset-taro": "3.6.24",
"eslint": "^8.12.0",
"eslint-config-taro": "3.6.24",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^9.0.11",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.5.0",
"lint-staged": "^15.2.2",
"mockjs": "^1.1.0",
"postcss": "^8.4.18",
"react-refresh": "^0.11.0",
"stylelint": "^14.4.0",
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.1.0",
"webpack": "5.78.0"
},
"lint-staged": {
"*.ts": "prettier --write",
"*.tsx": "prettier --write"
}
"name": "eva-notify",
"version": "1.0.0",
"private": true,
"description": "A Wechat miniprogram project of EVA platform",
"templateInfo": {
"name": "default",
"typescript": true,
"css": "Sass",
"framework": "React"
},
"scripts": {
"build:weapp": "taro build --type weapp",
"build:swan": "taro build --type swan",
"build:alipay": "taro build --type alipay",
"build:tt": "taro build --type tt",
"build:h5": "taro build --type h5",
"build:rn": "taro build --type rn",
"build:qq": "taro build --type qq",
"build:jd": "taro build --type jd",
"build:quickapp": "taro build --type quickapp",
"build:harmony-hybrid": "taro build --type harmony-hybrid",
"dev:weapp": "npm run build:weapp -- --watch --mode dev",
"dev:swan": "npm run build:swan -- --watch",
"dev:alipay": "npm run build:alipay -- --watch",
"dev:tt": "npm run build:tt -- --watch",
"dev:h5": "npm run build:h5 -- --watch",
"dev:rn": "npm run build:rn -- --watch",
"dev:qq": "npm run build:qq -- --watch",
"dev:jd": "npm run build:jd -- --watch",
"dev:quickapp": "npm run build:quickapp -- --watch",
"dev:harmony-hybrid": "npm run build:harmony-hybrid -- --watch",
"test": "jest",
"prepare": "husky install"
},
"browserslist": [
"last 3 versions",
"Android >= 4.1",
"ios >= 8"
],
"author": "",
"dependencies": {
"@babel/runtime": "^7.21.5",
"@tarojs/components": "3.6.24",
"@tarojs/helper": "3.6.24",
"@tarojs/plugin-framework-react": "3.6.24",
"@tarojs/plugin-platform-alipay": "3.6.24",
"@tarojs/plugin-platform-harmony-hybrid": "3.6.24",
"@tarojs/plugin-platform-jd": "3.6.24",
"@tarojs/plugin-platform-qq": "3.6.24",
"@tarojs/plugin-platform-swan": "3.6.24",
"@tarojs/plugin-platform-tt": "3.6.24",
"@tarojs/plugin-platform-weapp": "3.6.24",
"@tarojs/react": "3.6.24",
"@tarojs/runtime": "3.6.24",
"@tarojs/shared": "3.6.24",
"@tarojs/taro": "3.6.24",
"process": "^0.11.10",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"taro-ui": "^3.3.0"
},
"devDependencies": {
"@babel/core": "^7.8.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
"@tarojs/cli": "3.6.24",
"@tarojs/plugin-mock": "^0.0.9",
"@tarojs/plugin-platform-h5": "3.6.24",
"@tarojs/taro-loader": "3.6.24",
"@tarojs/test-utils-react": "^0.1.1",
"@tarojs/webpack5-runner": "3.6.24",
"@types/jest": "^29.3.1",
"@types/node": "^18.15.11",
"@types/react": "^18.0.0",
"@types/sass": "^1.43.1",
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"babel-preset-taro": "3.6.24",
"eslint": "^8.12.0",
"eslint-config-taro": "3.6.24",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^9.0.11",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.5.0",
"lint-staged": "^15.2.2",
"mockjs": "^1.1.0",
"postcss": "^8.4.18",
"react-refresh": "^0.11.0",
"stylelint": "^14.4.0",
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.1.0",
"webpack": "5.78.0"
},
"lint-staged": {
"*.ts": "prettier --write",
"*.tsx": "prettier --write"
}
}

View File

@ -7,6 +7,7 @@ export default defineAppConfig({
'pages/user/inform/inform',
'pages/user/about/about',
'pages/user/report/report',
'pages/user/member/member',
],
window: {
backgroundTextStyle: 'light',

View File

@ -1,11 +1,23 @@
import { PropsWithChildren } from 'react';
import { useLaunch } from '@tarojs/taro';
import Taro, { useLaunch } from '@tarojs/taro';
import { getUrl } from '@/service';
import pt from '@/plain-text';
import 'taro-ui/dist/style/index.scss';
import './app.scss';
function App({ children }: PropsWithChildren<any>) {
useLaunch(() => {
console.log('App launched.');
Taro.request({
url: getUrl('/user/locale/get'),
method: 'GET',
data: {
token: 'token_test',
},
}).then(res => {
console.log(res.data);
pt.setLang(res.data.data.lang);
});
});
// children 是将要会渲染的页面

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -1,17 +1,24 @@
import { View } from '@tarojs/components';
import { View, Text } from '@tarojs/components';
import { AtDivider } from 'taro-ui';
import pt from '@/plain-text';
export default () => {
const blankHeight = 120;
const blankHeightUpper = 15;
const blankHeightLower = 110;
return (
<View>
<AtDivider
content={pt.get().pageFooter.dividerText}
fontColor='#dddddd'
lineColor='#dddddd'
/>
<View style={{ height: blankHeight }}></View>
<View style={{ height: blankHeightUpper }}></View>
<View>
<AtDivider
content={pt.get().pageFooter.dividerText}
fontColor='#dddddd'
lineColor='#dddddd'
/>
</View>
<View className='at-row at-row__justify--center'>
<Text style='color:#dddddd;'>© 2024 EVA Tech</Text>
</View>
<View style={{ height: blankHeightLower }}></View>
</View>
);
};

View File

@ -1,9 +1,12 @@
import { Component, ReactNode } from 'react';
import { AtForm, AtInput, AtButton, AtMessage } from 'taro-ui';
import { getUrl } from '@/service';
import Taro from '@tarojs/taro';
import pt from '@/plain-text';
import './inform.scss';
const submitInterval = 5000;
export default class InformPage extends Component {
state = {
phone: '',
@ -29,43 +32,56 @@ export default class InformPage extends Component {
isDisable: true,
});
console.log(this.state.name, this.state.phone);
Taro.request({
url: getUrl('/user/update'),
method: 'POST',
data: {
token: 'token_test',
name: this.state.name,
phone: this.state.phone,
},
})
.then(res => {
console.log(res.data);
Taro.atMessage({
message: pt.get().button.submitText.success,
type: 'success',
});
})
.catch(err => {
console.log(err);
Taro.atMessage({
message: pt.get().button.submitText.error + err.toString(),
type: 'error',
});
});
this.setState({
isLoading: false,
});
Taro.atMessage({
message: pt.get().informPage.submitText.success,
type: 'success',
});
setTimeout(() => {
this.setState({
isDisable: false,
});
}, 5000);
}
onReset() {
this.setState({
phone: '',
name: '',
});
}, submitInterval);
}
render(): ReactNode {
return (
<AtForm
onSubmit={this.onSubmit.bind(this)}
onReset={this.onReset.bind(this)}
>
<AtForm onSubmit={this.onSubmit.bind(this)}>
<AtMessage />
<AtInput
clear
required
name='phone'
title={pt.get().informPage.phoneText.title}
type='text'
type='number'
placeholder={pt.get().informPage.phoneText.placeholder}
value={this.state.phone}
onChange={this.handleChangePhone.bind(this)}
/>
<AtInput
required
clear
name='name'
title={pt.get().informPage.nameText.title}
type='text'
@ -79,10 +95,7 @@ export default class InformPage extends Component {
type='primary'
disabled={this.state.isDisable}
>
{pt.get().informPage.buttonText.submit}
</AtButton>
<AtButton formType='reset' type='secondary'>
{pt.get().informPage.buttonText.reset}
{pt.get().button.buttonText.submit}
</AtButton>
</AtForm>
);

View File

@ -0,0 +1,3 @@
export default definePageConfig({
usingComponents: {},
});

View File

View File

@ -0,0 +1,103 @@
import { Component, ReactNode } from 'react';
import { AtForm, AtInput, AtButton, AtMessage } from 'taro-ui';
import { getUrl } from '@/service';
import Taro from '@tarojs/taro';
import pt from '@/plain-text';
import './member.scss';
const loginInterval = 5000;
export default class MemberPage extends Component {
state = {
stuid: '',
passwd: '',
isLoading: false,
isDisable: false,
};
handleChangeStuid(stuid: string) {
this.setState({
stuid: stuid,
});
return stuid;
}
handleChangePasswd(passwd: string) {
this.setState({
passwd: passwd,
});
return passwd;
}
onSubmit() {
this.setState({
isLoading: true,
isDisable: true,
});
console.log([this.state.stuid, this.state.passwd]);
Taro.request({
url: getUrl('/member/login'),
method: 'POST',
data: {
token: 'token_test',
name: this.state.stuid,
passwd: this.state.passwd,
},
})
.then(res => {
console.log(res.data);
Taro.atMessage({
message: pt.get().button.loginText.success,
type: 'success',
});
})
.catch(err => {
console.log(err);
Taro.atMessage({
message: pt.get().button.loginText.error + err.toString(),
type: 'error',
});
});
this.setState({
isLoading: false,
});
setTimeout(() => {
this.setState({
isDisable: false,
});
}, loginInterval);
}
render(): ReactNode {
return (
<AtForm onSubmit={this.onSubmit.bind(this)}>
<AtMessage />
<AtInput
required
name='stuid'
title={pt.get().memberPage.stuidText.title}
type='number'
clear
placeholder={pt.get().memberPage.stuidText.placeholder}
value={this.state.stuid}
onChange={this.handleChangeStuid.bind(this)}
/>
<AtInput
clear
required
name='name'
title={pt.get().memberPage.passwdText.title}
type='password'
placeholder={pt.get().memberPage.passwdText.placeholder}
value={this.state.passwd}
onChange={this.handleChangePasswd.bind(this)}
/>
<AtButton
loading={this.state.isLoading}
formType='submit'
type='primary'
disabled={this.state.isDisable}
>
{pt.get().button.buttonText.login}
</AtButton>
</AtForm>
);
}
}

View File

@ -1,9 +1,12 @@
import { AtTextarea, AtButton, AtForm, AtMessage } from 'taro-ui';
import { Component, ReactNode } from 'react';
import { getUrl } from '@/service';
import Taro from '@tarojs/taro';
import pt from '@/plain-text';
import './report.scss';
const submitInterval = 5000;
export default class SettingsPage extends Component {
state = {
report: '',
@ -21,18 +24,36 @@ export default class SettingsPage extends Component {
isDisable: true,
});
console.log(this.state.report);
Taro.request({
url: getUrl('/report'),
method: 'POST',
data: {
token: 'token_test',
report: this.state.report,
},
})
.then(res => {
console.log(res.data);
Taro.atMessage({
message: pt.get().button.submitText.success,
type: 'success',
});
})
.catch(err => {
console.log(err);
Taro.atMessage({
message: pt.get().button.submitText.error + err.toString(),
type: 'error',
});
});
this.setState({
isLoading: false,
});
Taro.atMessage({
message: '提交成功',
type: 'success',
});
setTimeout(() => {
this.setState({
isDisable: false,
});
}, 5000);
}, submitInterval);
}
onReset() {
this.setState({
@ -58,10 +79,10 @@ export default class SettingsPage extends Component {
type='primary'
disabled={this.state.isDisable}
>
{pt.get().reportPage.buttonText.submit}
{pt.get().button.buttonText.submit}
</AtButton>
<AtButton formType='reset' type='secondary'>
{pt.get().reportPage.buttonText.reset}
{pt.get().button.buttonText.reset}
</AtButton>
</AtForm>
);

View File

@ -1,13 +1,18 @@
import { AtList, AtListItem } from 'taro-ui';
import { AtList, AtListItem, AtToast } from 'taro-ui';
import { Component, ReactNode } from 'react';
import { View, Picker } from '@tarojs/components';
import { View, Picker, Image, Text } from '@tarojs/components';
import { getUrl } from '@/service';
import Taro from '@tarojs/taro';
import type CustomTabBar from '@/custom-tab-bar';
import PageFooter from '@/components/PageFooter/PageFooter';
import aboutIcon from '@/assets/icons/AboutPage/about.svg';
import pt, { Lang } from '@/plain-text';
import logo from '@/assets/images/UserPage/logo.png';
import './user.scss';
const listLangInterval = 20;
const memberClickTimes = 7;
export default class UserPage extends Component {
state = {
selector: ['简体中文', 'English'],
@ -15,6 +20,9 @@ export default class UserPage extends Component {
zh_CN: '简体中文',
en_US: 'English',
}[pt.getCurLang()],
clicks: memberClickTimes,
isToastOpen: false,
toastText: '',
};
// 以下是TabBar相关
@ -25,6 +33,30 @@ export default class UserPage extends Component {
}
// 以上是TabBar相关
onTapImage = () => {
this.setState({
clicks: this.state.clicks - 1,
});
if (this.state.clicks < 3) {
this.setState({
toastText:
pt.get().userPage.memberEntry.front +
(this.state.clicks + 1).toString() + // React State's feature
pt.get().userPage.memberEntry.behind,
isToastOpen: true,
});
if (this.state.clicks == 0) {
this.setState({
isToastOpen: false,
clicks: memberClickTimes,
});
Taro.navigateTo({
url: '/pages/user/member/member',
});
}
}
};
showLangDict: Record<string, Lang> = {
: 'zh_CN',
English: 'en_US',
@ -34,7 +66,18 @@ export default class UserPage extends Component {
this.setState({
selectorChecked: this.state.selector[e.detail.value],
});
pt.setLang(this.showLangDict[this.state.selector[e.detail.value]]);
let currentLang = this.showLangDict[this.state.selector[e.detail.value]];
pt.setLang(currentLang);
Taro.request({
url: getUrl('/user/locale/update'),
method: 'POST',
data: {
token: 'token_test',
lang: currentLang,
},
}).then(res => {
console.log(res.data);
});
Taro.reLaunch({
url: '/pages/user/user',
});
@ -67,6 +110,26 @@ export default class UserPage extends Component {
render(): ReactNode {
return (
<View>
<View
className='at-row at-row__justify--center at-row__align--end'
style='height:110px;'
>
<Image
onTap={this.onTapImage}
style='width: 100px;height: 100px;'
src={logo}
/>
</View>
<AtToast
isOpened={this.state.isToastOpen}
text={this.state.toastText}
></AtToast>
<View
className='at-row at-row__justify--center at-row__align--center'
style='height:60px;color:#696969;'
>
<Text> EVA Notify v0.0.1</Text>
</View>
<AtList>
<AtListItem
title={pt.get().userPage.ticketColumn.title}
@ -98,6 +161,7 @@ export default class UserPage extends Component {
thumb={aboutIcon}
onClick={this.aboutPage}
/>
<View style={{ height: listLangInterval }}></View>
<Picker
mode='selector'
range={this.state.selector}

View File

@ -0,0 +1,47 @@
export interface ButtonText {
buttonText: {
submit: string;
reset: string;
login: string;
};
submitText: {
success: string;
error: string;
};
loginText: {
success: string;
error: string;
};
}
export const buttonZhCn: ButtonText = {
buttonText: {
submit: '提交',
reset: '清空',
login: '登录',
},
submitText: {
success: '提交成功',
error: '提交失败:',
},
loginText: {
success: '登录成功',
error: '登录失败',
},
};
export const buttonEnUs: ButtonText = {
buttonText: {
submit: 'Submit',
reset: 'Reset',
login: 'Login',
},
submitText: {
success: 'Success',
error: 'Error: ',
},
loginText: {
success: '登录成功',
error: '登录失败',
},
};

View File

@ -1,7 +1,4 @@
export interface InformPageText {
submitText: {
success: string;
};
phoneText: {
title: string;
placeholder: string;
@ -10,16 +7,9 @@ export interface InformPageText {
title: string;
placeholder: string;
};
buttonText: {
submit: string;
reset: string;
};
}
export const informPageZhCn: InformPageText = {
submitText: {
success: '提交成功',
},
phoneText: {
title: '手机号码',
placeholder: '便于查询工单',
@ -28,16 +18,9 @@ export const informPageZhCn: InformPageText = {
title: '真实姓名',
placeholder: '必填,与工单绑定',
},
buttonText: {
submit: '提交',
reset: '清空',
},
};
export const informtPageEnUs: InformPageText = {
submitText: {
success: 'Success',
},
export const informPageEnUs: InformPageText = {
phoneText: {
title: 'Phone',
placeholder: '便于查询工单',
@ -46,8 +29,4 @@ export const informtPageEnUs: InformPageText = {
title: 'Real Name',
placeholder: '必填,与工单绑定',
},
buttonText: {
submit: 'Submit',
reset: 'Reset',
},
};

View File

@ -0,0 +1,32 @@
export interface MemberPageText {
stuidText: {
title: string;
placeholder: string;
};
passwdText: {
title: string;
placeholder: string;
};
}
export const memberPageZhCn: MemberPageText = {
stuidText: {
title: '学号',
placeholder: '与统一身份认证学号一致',
},
passwdText: {
title: '密码',
placeholder: '与 EVA 统一身份认证一致',
},
};
export const memberPageEnUs: MemberPageText = {
stuidText: {
title: 'Student ID',
placeholder: '与统一身份认证学号一致',
},
passwdText: {
title: 'Password',
placeholder: '与 EVA 统一身份认证一致',
},
};

View File

@ -1,25 +1,13 @@
export interface ReportPageText {
placeHolderText: string;
buttonText: {
submit: string;
reset: string;
};
}
export const reportPageZhCn: ReportPageText = {
placeHolderText:
'无论是有关于小程序的建议还是关于E志者协会的建议都可以提出来哦',
buttonText: {
submit: '提交',
reset: '清空',
},
};
export const reportPageEnUs: ReportPageText = {
placeHolderText:
'无论是有关于小程序的建议还是关于E志者协会的建议都可以提出来哦',
buttonText: {
submit: 'Submit',
reset: 'Reset',
},
};

View File

@ -1,6 +1,8 @@
export interface UserPageText {
mainTitleLine: string;
subTitleLine: string;
memberEntry: {
front: string;
behind: string;
};
ticketColumn: {
title: string;
note: string;
@ -24,8 +26,10 @@ export interface UserPageText {
}
export const userPageZhCn: UserPageText = {
mainTitleLine: '您好这里是E志者协会',
subTitleLine: '维修请至【东三-204】实验室',
memberEntry: {
front: '再点击 ',
behind: ' 次以进入协会成员登录页面',
},
ticketColumn: {
title: '我的工单',
note: '在这里查看历史工单!',
@ -49,8 +53,10 @@ export const userPageZhCn: UserPageText = {
};
export const userPageEnUs: UserPageText = {
mainTitleLine: '您好这里是E志者协会',
subTitleLine: '维修请至【东三-204】实验室',
memberEntry: {
front: '再点击 ',
behind: ' 次以进入协会成员登录页面',
},
ticketColumn: {
title: '我的工单',
note: '在这里查看历史工单!',

View File

@ -3,8 +3,10 @@ import { MainPageText, mainPageZhCn, mainPageEnUs } from './MainPage';
import { UserPageText, userPageZhCn, userPageEnUs } from './UserPage';
import { TabBarText, tabBarEnUs, tabBarZhCn } from './TabBar';
import { ReportPageText, reportPageEnUs, reportPageZhCn } from './ReportPage';
import { InformPageText, informPageZhCn, informtPageEnUs } from './InformPage';
import { InformPageText, informPageZhCn, informPageEnUs } from './InformPage';
import { AboutPageText, aboutPageEnUs, aboutPageZhCn } from './AboutPage';
import { ButtonText, buttonEnUs, buttonZhCn } from './Button';
import { MemberPageText, memberPageEnUs, memberPageZhCn } from './MemberPage';
interface TextRecord {
pageFooter: PageFooterText;
@ -14,6 +16,8 @@ interface TextRecord {
reportPage: ReportPageText;
informPage: InformPageText;
aboutPage: AboutPageText;
button: ButtonText;
memberPage: MemberPageText;
}
const textZhCn: TextRecord = {
@ -24,6 +28,8 @@ const textZhCn: TextRecord = {
reportPage: reportPageZhCn,
informPage: informPageZhCn,
aboutPage: aboutPageZhCn,
button: buttonZhCn,
memberPage: memberPageZhCn,
};
const textEnUs: TextRecord = {
@ -32,8 +38,10 @@ const textEnUs: TextRecord = {
userPage: userPageEnUs,
tabBar: tabBarEnUs,
reportPage: reportPageEnUs,
informPage: informtPageEnUs,
informPage: informPageEnUs,
aboutPage: aboutPageEnUs,
button: buttonEnUs,
memberPage: memberPageEnUs,
};
// type Lang = 'zh_CN' | 'en_US' | ...;