Compare commits
4 Commits
a7fd2b2856
...
1907f1e967
| Author | SHA1 | Date |
|---|---|---|
|
|
1907f1e967 | |
|
|
39dd945020 | |
|
|
b603ad24b3 | |
|
|
dd07c1da10 |
113
mock/api.ts
113
mock/api.ts
|
|
@ -1,8 +1,117 @@
|
||||||
|
import userinfo from './userinfo.json';
|
||||||
|
import lang from './lang.json';
|
||||||
|
import report from './report.json';
|
||||||
|
import newComment from './newComment.json';
|
||||||
|
import ticket from './ticket.json';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
'GET /testdata': {
|
'GET /dutyinfo': {
|
||||||
success: true,
|
success: true,
|
||||||
data: {
|
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': {
|
||||||
|
file: userinfo,
|
||||||
|
},
|
||||||
|
'GET /user/locale/get': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
token: 'token_test',
|
||||||
|
lang: 'zn_CN',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'POST /user/locale/update': {
|
||||||
|
file: lang,
|
||||||
|
},
|
||||||
|
'POST /report': {
|
||||||
|
file: report,
|
||||||
|
},
|
||||||
|
'GET /user/mytickets': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
id: 6830,
|
||||||
|
type: 1,
|
||||||
|
status: 5,
|
||||||
|
device: '主机',
|
||||||
|
deviceModel: '技嘉',
|
||||||
|
owner: '武技栏',
|
||||||
|
phone: '18888888888',
|
||||||
|
createdTime: '2024-03-06T19:49:27.043865',
|
||||||
|
isConfirmed: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'GET /tickets/info/': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'POST /tickets/newcomment': {
|
||||||
|
file: newComment,
|
||||||
|
},
|
||||||
|
'POST /tickets/create': {
|
||||||
|
file: ticket,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"lang": "en_US"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"content": "这是一条评论"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"content": "aaa bbbb cccc"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"type": 1,
|
||||||
|
"device": "华硕",
|
||||||
|
"deviceModel": "天选3",
|
||||||
|
"owner": "西西弗",
|
||||||
|
"phone": "12333333333",
|
||||||
|
"description": "没法用pd充电",
|
||||||
|
"accessories": [0]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"name": "宇航员",
|
||||||
|
"phone": "12333332103"
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
|
|
@ -1,17 +1,24 @@
|
||||||
import { View } from '@tarojs/components';
|
import { View, Text } from '@tarojs/components';
|
||||||
import { AtDivider } from 'taro-ui';
|
import { AtDivider } from 'taro-ui';
|
||||||
import pt from '@/plain-text';
|
import pt from '@/plain-text';
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const blankHeight = 120;
|
const blankHeightUpper = 15;
|
||||||
|
const blankHeightLower = 110;
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<AtDivider
|
<View style={{ height: blankHeightUpper }}></View>
|
||||||
content={pt.get().pageFooter.dividerText}
|
<View>
|
||||||
fontColor='#dddddd'
|
<AtDivider
|
||||||
lineColor='#dddddd'
|
content={pt.get().pageFooter.dividerText}
|
||||||
/>
|
fontColor='#dddddd'
|
||||||
<View style={{ height: blankHeight }}></View>
|
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>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
import { AtList, AtListItem } from 'taro-ui';
|
import { AtList, AtListItem } from 'taro-ui';
|
||||||
import { Component, ReactNode } from 'react';
|
import { Component, ReactNode } from 'react';
|
||||||
import { View, Picker } from '@tarojs/components';
|
import { View, Picker, Image, Text } from '@tarojs/components';
|
||||||
import Taro from '@tarojs/taro';
|
import Taro from '@tarojs/taro';
|
||||||
import type CustomTabBar from '@/custom-tab-bar';
|
import type CustomTabBar from '@/custom-tab-bar';
|
||||||
import PageFooter from '@/components/PageFooter/PageFooter';
|
import PageFooter from '@/components/PageFooter/PageFooter';
|
||||||
import aboutIcon from '@/assets/icons/AboutPage/about.svg';
|
import aboutIcon from '@/assets/icons/AboutPage/about.svg';
|
||||||
import pt, { Lang } from '@/plain-text';
|
import pt, { Lang } from '@/plain-text';
|
||||||
|
import logo from '@/assets/images/UserPage/logo.png';
|
||||||
import './user.scss';
|
import './user.scss';
|
||||||
|
|
||||||
export default class UserPage extends Component {
|
export default class UserPage extends Component {
|
||||||
|
|
@ -67,6 +68,18 @@ export default class UserPage extends Component {
|
||||||
render(): ReactNode {
|
render(): ReactNode {
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
|
<View
|
||||||
|
className='at-row at-row__justify--center at-row__align--end'
|
||||||
|
style='height:110px;'
|
||||||
|
>
|
||||||
|
<Image style='width: 100px;height: 100px;' src={logo} />
|
||||||
|
</View>
|
||||||
|
<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>
|
<AtList>
|
||||||
<AtListItem
|
<AtListItem
|
||||||
title={pt.get().userPage.ticketColumn.title}
|
title={pt.get().userPage.ticketColumn.title}
|
||||||
|
|
@ -98,6 +111,7 @@ export default class UserPage extends Component {
|
||||||
thumb={aboutIcon}
|
thumb={aboutIcon}
|
||||||
onClick={this.aboutPage}
|
onClick={this.aboutPage}
|
||||||
/>
|
/>
|
||||||
|
<View style={{ height: 20 }}></View>
|
||||||
<Picker
|
<Picker
|
||||||
mode='selector'
|
mode='selector'
|
||||||
range={this.state.selector}
|
range={this.state.selector}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue