Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04e616c477 | ||
|
|
3242b16e3d | ||
|
|
6f960d46a8 | ||
|
|
669896d253 | ||
|
|
fc9347e7c1 | ||
|
|
96dc81bd82 | ||
|
|
54d9dc45b4 | ||
|
|
206eb49893 | ||
|
|
590db1f3fd | ||
|
|
5cc3387008 | ||
|
|
fbe7b9d7de | ||
|
|
7e3ad80121 | ||
|
|
0dc87d06d6 | ||
|
|
86398ff9a9 | ||
|
|
8b2ed25109 | ||
|
|
fb9f4b4342 | ||
|
|
3313307e84 | ||
|
|
b68e3db0a3 | ||
|
|
d7cdf46026 | ||
|
|
6325147e81 | ||
|
|
be687d0372 | ||
|
|
0351819fa2 | ||
|
|
a12c69cdc0 | ||
|
|
1702b5aa6a | ||
|
|
952a6caa24 | ||
|
|
d1d01f0ad1 | ||
|
|
51407930bb | ||
|
|
097f6832e3 | ||
|
|
4d6eca0434 | ||
|
|
ab52ffe7ae | ||
|
|
c487187451 | ||
|
|
3fd0ebf9c8 | ||
|
|
7a198cfe03 | ||
|
|
ff926676bd | ||
|
|
01614c9163 | ||
|
|
3375e00b37 | ||
|
|
b14d9c363d | ||
|
|
7f017a0b47 | ||
|
|
5ce1db7693 | ||
|
|
d34564980f | ||
|
|
5bd07e0ca7 | ||
|
|
a07545b841 | ||
|
|
f592d87e17 | ||
|
|
ec3acd74e2 | ||
|
|
2cd401409e | ||
|
|
aad95000a8 | ||
|
|
4ab1d5c89a | ||
|
|
e19b4ccabd | ||
|
|
4feccbd442 | ||
|
|
59ee57827b | ||
|
|
8a60d4c48f | ||
|
|
7b62c5e473 | ||
|
|
e6ffd7d5d7 | ||
|
|
ff317c1cd2 | ||
|
|
1cf16472d2 | ||
|
|
079afea2e0 | ||
|
|
e1075c154b | ||
|
|
2d148e7aa4 | ||
|
|
c8dd8061b2 | ||
|
|
24f71ed997 | ||
|
|
97a8d0570a | ||
|
|
f3f5be793b | ||
|
|
a7c96b2e8c | ||
|
|
7d1ae68643 | ||
|
|
3de05c7cfc | ||
|
|
7ae5d8758a | ||
|
|
16cb2362e6 | ||
|
|
42ee477ec4 | ||
|
|
5b08555359 | ||
|
|
574d3692cd | ||
|
|
1f0d4881f3 | ||
|
|
aff74acc1f | ||
|
|
456c891ca6 | ||
|
|
952c230148 | ||
|
|
9f77cb0f2a | ||
|
|
f2f4929fc9 | ||
|
|
5c78139d5a | ||
|
|
4f914a7563 | ||
|
|
239d4f0c7c | ||
|
|
db11f03bda | ||
|
|
56ec1827ca | ||
|
|
d705970d1f | ||
|
|
2ef04b96a1 | ||
|
|
599166e603 | ||
|
|
787b37fc42 | ||
|
|
3c2b613d87 | ||
|
|
f20a38af9b | ||
|
|
31d7aea480 | ||
|
|
3db6425dc3 | ||
|
|
cd3064c90f | ||
|
|
4640f89ea8 | ||
|
|
3d5cd6c8da | ||
|
|
7ced70ab21 | ||
|
|
2398644cc3 | ||
|
|
501f27bfbb | ||
|
|
e39e8d4e13 | ||
|
|
7cf2cbb798 | ||
|
|
d525f0288b | ||
|
|
7f345af777 | ||
|
|
563a0c42ea | ||
|
|
cce351750d | ||
|
|
ac9645b987 | ||
|
|
e7b0b3239e | ||
|
|
b41498976e | ||
|
|
6b554196b3 | ||
|
|
2d5ce655ef | ||
|
|
5614ce5818 | ||
|
|
fc3ef61e5d | ||
|
|
60f10eaa8f | ||
|
|
9931b23337 | ||
|
|
84507f7214 | ||
|
|
802d008767 | ||
|
|
c070b356fe | ||
|
|
b1c0e5d8b1 | ||
|
|
e82225ecbc | ||
|
|
df71ebf219 | ||
|
|
0dac2ad185 | ||
|
|
e1c3b464a6 | ||
|
|
e11a58dbb5 | ||
|
|
5bafff52ad | ||
|
|
d83136a69c | ||
|
|
b243fc5e4c | ||
|
|
2f6b98b43f | ||
|
|
6cd27cce10 | ||
|
|
7810cbaca1 | ||
|
|
0120da0760 | ||
|
|
f17bfa2a9e | ||
|
|
2e2629fe0a | ||
|
|
eea622b657 | ||
|
|
cd076cd5a4 | ||
|
|
a1aa63635f | ||
|
|
946a312c61 | ||
|
|
388814f9d9 | ||
|
|
9bd6c8f1b4 | ||
|
|
551d93c8b5 | ||
|
|
32ce506764 | ||
|
|
eaa22dcaa5 | ||
|
|
9c6cbd91ff | ||
|
|
6583b51750 | ||
|
|
dd56725575 | ||
|
|
2fd629d479 | ||
|
|
d5b8af7d7b | ||
|
|
aa334d3f93 | ||
|
|
7aaad7563f | ||
|
|
4d6a769fea | ||
|
|
afdedea344 | ||
|
|
2920059ffa | ||
|
|
d2de74578b | ||
|
|
ac23f88cdd | ||
|
|
e1e998628f | ||
|
|
806e7a393c | ||
|
|
fd6a60d1d3 | ||
|
|
36a9a35886 | ||
|
|
51106ead5e | ||
|
|
4e31eb70e2 | ||
|
|
dd770b8ece | ||
|
|
b174304d74 | ||
|
|
cc5af58155 | ||
|
|
88cdb6cb92 | ||
|
|
00977db512 | ||
|
|
1907f1e967 | ||
|
|
39dd945020 | ||
|
|
b603ad24b3 | ||
|
|
dd07c1da10 | ||
|
|
a7fd2b2856 | ||
|
|
0baf91fadf | ||
|
|
c756e74778 | ||
|
|
133d60375a | ||
|
|
bea23f4705 | ||
|
|
229dffa9a1 | ||
|
|
74f644b3ee | ||
|
|
0a98ea71ac | ||
|
|
1a30ff6def | ||
|
|
3232994fb2 | ||
|
|
d995c6ed43 | ||
|
|
6cbd6685bc | ||
|
|
c63b7fcca8 | ||
|
|
34c3753d2c | ||
|
|
a5aa10d6f4 | ||
|
|
f37af7dacd | ||
|
|
21e21f272f | ||
|
|
a408ac9e39 | ||
|
|
162b7a7d09 | ||
|
|
54091bb6b3 | ||
|
|
11f16b6b06 | ||
|
|
5f2e66546c |
@@ -1,2 +1,4 @@
|
|||||||
# 配置文档参考 https://taro-docs.jd.com/docs/next/env-mode-config
|
# 配置文档参考 https://taro-docs.jd.com/docs/next/env-mode-config
|
||||||
TARO_APP_ID="wx636eb7cf2b84f305"
|
TARO_APP_ID="wx636eb7cf2b84f305"
|
||||||
|
TARO_APP_API="https://ate.zjueva.net"
|
||||||
|
# TARO_APP_API="http://127.0.0.1:9527"
|
||||||
@@ -1 +1,2 @@
|
|||||||
TARO_APP_ID="wx636eb7cf2b84f305"
|
TARO_APP_ID="wx636eb7cf2b84f305"
|
||||||
|
TARO_APP_API="https://ate.zjueva.net"
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
config
|
||||||
|
.husky
|
||||||
|
**/.gitignore
|
||||||
|
dist/
|
||||||
|
deploy_versions/
|
||||||
|
.temp/
|
||||||
|
.rn_temp/
|
||||||
|
node_modules/
|
||||||
|
.DS_Store
|
||||||
|
.swc
|
||||||
|
.husky
|
||||||
|
.prettierignore
|
||||||
|
.env.*
|
||||||
|
**/*.json
|
||||||
|
**/*.svg
|
||||||
|
**/*.scss
|
||||||
|
**/*.md
|
||||||
|
*.config.js
|
||||||
|
index.html
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
/**/.gitignore
|
.eslintignore
|
||||||
|
**/.gitignore
|
||||||
dist/
|
dist/
|
||||||
deploy_versions/
|
deploy_versions/
|
||||||
.temp/
|
.temp/
|
||||||
@@ -9,4 +10,5 @@ node_modules/
|
|||||||
.husky
|
.husky
|
||||||
.prettierignore
|
.prettierignore
|
||||||
.env.*
|
.env.*
|
||||||
|
project.*.json
|
||||||
**/*.svg
|
**/*.svg
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
"semi": true,
|
"semi": true,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"proseWrap": "preserve",
|
"proseWrap": "preserve",
|
||||||
"arrowParens": "avoid",
|
"arrowParens": "always",
|
||||||
"bracketSpacing": true,
|
"bracketSpacing": true,
|
||||||
"jsxSingleQuote": true,
|
"jsxSingleQuote": true,
|
||||||
"endOfLine": "auto"
|
"endOfLine": "auto"
|
||||||
|
|||||||
@@ -10,25 +10,25 @@
|
|||||||
|
|
||||||
1. 能看到现在维修状况:有几台正在维修,有几个人值班(空闲状态)
|
1. 能看到现在维修状况:有几台正在维修,有几个人值班(空闲状态)
|
||||||
2. 能看到自己机器的维修情况:维修进度、评论等
|
2. 能看到自己机器的维修情况:维修进度、评论等
|
||||||
1. 使用手机号确定id
|
1. 使用手机号查询工单
|
||||||
|
|
||||||
## 互动
|
## 互动
|
||||||
|
|
||||||
1. 提醒:当修好之后会向你发送信息,提醒来取
|
1. 提醒:当修好(工单状态改变为待取回)之后会向你发送信息,提醒来取
|
||||||
2. 线上答疑:协会成员登录账号,看到机主提出的问题可以回答(暂定由值班组长管理)
|
2. 线上答疑:协会成员登录账号(通过 EVA Auth 授权),看到机主提出的问题可以回答(暂定由值班组长管理)
|
||||||
1. 公开答疑仅回复能不能修,更复杂的问题推荐其来204
|
1. 公开答疑仅回复能不能修,更复杂的问题推荐其来204
|
||||||
2. 当自己的机器正在维修时,可以与维修人员交流进度和问题等
|
2. 当自己的机器正在维修时,可以与维修人员交流进度和问题等
|
||||||
3. (暂定)答疑功能使用预填写工单、工单的评论实现
|
3. 答疑功能使用预填写工单的评论实现
|
||||||
|
|
||||||
## 信息展示
|
## 信息展示
|
||||||
|
|
||||||
1. 展示协会值班时间(现在是否在值班),若不在值班显示预计值班时间、不值班的原因等
|
1. 展示协会值班时间(现在是否在值班),若不在值班显示预计值班时间、不值班的原因
|
||||||
2. 展示维修流程,包括注意事项等
|
2. 展示维修流程,包括注意事项等
|
||||||
1. 戴尔、Surface等不拆
|
1. 戴尔、Surface等不拆
|
||||||
2. 数据备份提醒
|
2. 数据备份提醒
|
||||||
3. 不收礼物
|
3. 不收礼物
|
||||||
4. 不要在204饮食
|
4. 不要在204饮食
|
||||||
3. (备选)其他语言本地化
|
3. 其他语言本地化
|
||||||
|
|
||||||
## 面向协会成员
|
## 面向协会成员
|
||||||
|
|
||||||
@@ -42,13 +42,13 @@
|
|||||||
|
|
||||||
## 对接
|
## 对接
|
||||||
|
|
||||||
1. 与EVA统一身份认证对接
|
1. 与 EVA 统一身份认证对接
|
||||||
1. 协会成员登录入口
|
1. 协会成员登录入口
|
||||||
2. 个人信息同步
|
2. 个人信息同步
|
||||||
2. 与Oreo对接
|
2. 与 Oreo 对接
|
||||||
1. 维修工单列表查看
|
1. 维修工单列表查看:七天内未取回的工单
|
||||||
2. 将预填写工单加入Oreo
|
2. 将预填写工单加入 Oreo
|
||||||
3. 防恶意行为
|
3. 防恶意行为(尚未设置)
|
||||||
1. 工单填写间隔限制为【1】分钟
|
1. 工单填写间隔限制为【1】分钟
|
||||||
2. 一个人一天最多能创建【10】个预填写工单
|
2. 一个人一天最多能创建【10】个预填写工单
|
||||||
3. 黑名单机制
|
3. 黑名单机制
|
||||||
@@ -58,18 +58,32 @@
|
|||||||
## 主页
|
## 主页
|
||||||
|
|
||||||
1. 信息显示
|
1. 信息显示
|
||||||
|
1. 不显示是哪一班,只显示今日值班时间
|
||||||
2. (协会成员)相关信息
|
2. (协会成员)相关信息
|
||||||
3. 提醒事项
|
3. 提醒事项
|
||||||
4. 如何联系到协会
|
4. 如何联系到协会
|
||||||
|
|
||||||
## 维修
|
## 维修
|
||||||
|
|
||||||
1. (面向机主)预填写工单
|
1. 预填写工单
|
||||||
2. 维修进度提示
|
2. 正在进行工单的展示
|
||||||
3. (面向协会成员)维修列表
|
|
||||||
|
## 成员
|
||||||
|
|
||||||
|
1. 最近七天内未取回的工单列表
|
||||||
|
2. 值班组长上传本班相关信息
|
||||||
|
3. 现在自己是否要值班(值班时间显示)
|
||||||
|
4. 提醒事项
|
||||||
|
|
||||||
|
|
||||||
## 我的
|
## 我的
|
||||||
|
|
||||||
1. 更改手机号等个人信息(手机号可以填写多个)
|
1. 更改手机号、姓名(手机号暂时只能填写一个)
|
||||||
2. (备选)修改用户名、头像
|
2. (备选)修改用户名、头像
|
||||||
3. 设置真名(可帮助预填写工单)
|
3. 设置真名(可帮助预填写工单)
|
||||||
|
|
||||||
|
# 主席团管理页面
|
||||||
|
|
||||||
|
1. 值班表导入、更新
|
||||||
|
2. 成员权限管理
|
||||||
|
3. 特殊维修时间(如学园维修)、值班信息更新
|
||||||
|
|||||||
@@ -0,0 +1,528 @@
|
|||||||
|
# 接口文档
|
||||||
|
|
||||||
|
## 基本格式
|
||||||
|
|
||||||
|
### 成功响应格式
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"success": true,
|
||||||
|
"data": {
|
||||||
|
"foo": "bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**NOTE:** 若无特殊说明,`POST`请求的响应`data`字段为空(`{}`),可以不用管。
|
||||||
|
|
||||||
|
### 失败响应格式
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"success": false,
|
||||||
|
"err": "some error"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### `GET`请求默认格式(若无特殊说明)
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 主页面
|
||||||
|
|
||||||
|
### 值班信息 `GET /duty/info`
|
||||||
|
|
||||||
|
#### 当前在值班(正常值班时间)
|
||||||
|
|
||||||
|
data:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"isInDuty": true,
|
||||||
|
"inDutyCnt": 3,
|
||||||
|
"currentDuty": "1",
|
||||||
|
"place": "", // 只有当 currentDuty 为 others 时,place 和 值班时间 才不为空
|
||||||
|
"otherDutyStart": "",
|
||||||
|
"otherDutyEnd": "",
|
||||||
|
"offDutyReason": "",
|
||||||
|
"dutyRecoverTime": ""
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 当前在值班(其他值班时间)
|
||||||
|
|
||||||
|
data:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"isInDuty": true,
|
||||||
|
"inDutyCnt": 3,
|
||||||
|
"currentDuty": "others",
|
||||||
|
"place": "蓝田", // 只有当 currentDuty 为 others 时,place 才不为空
|
||||||
|
"otherDutyStart": "2024-03-07T11:52:48.523303", // Timestamp
|
||||||
|
"otherDutyEnd": "2024-03-07T13:52:48.523303",
|
||||||
|
"offDutyReason": "",
|
||||||
|
"dutyRecoverTime": ""
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 当前未值班
|
||||||
|
|
||||||
|
data:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"isInDuty": false,
|
||||||
|
"inDutyCnt": 0,
|
||||||
|
"currentDuty": "0", // '0' 代表正常值班时间下班,'others' 代表其他值班时间下班
|
||||||
|
"place": "",
|
||||||
|
"otherDutyStart": "",
|
||||||
|
"otherDutyEnd": "",
|
||||||
|
"offDutyReason": "学园维修",
|
||||||
|
"dutyRecoverTime": "下周一"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 当前值班暂停
|
||||||
|
|
||||||
|
data:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"isInDuty": false,
|
||||||
|
"inDutyCnt": 0,
|
||||||
|
"currentDuty": "off", // 'off' 代表当前值班暂停
|
||||||
|
"place": "",
|
||||||
|
"otherDutyStart": "",
|
||||||
|
"otherDutyEnd": "",
|
||||||
|
"offDutyReason": "考试周",
|
||||||
|
"dutyRecoverTime": "下周一"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 账号登陆
|
||||||
|
|
||||||
|
### 微信小程序登陆 `POST /login` OK
|
||||||
|
|
||||||
|
- Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": "wechat_login_code"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- Response
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"success": true,
|
||||||
|
"token": "your_token"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 检查 token 是否登陆 `GET /checklogin?token={token}` OK
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"islogin": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- Response
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"success": true,
|
||||||
|
"token": "your_token"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 用户页面
|
||||||
|
|
||||||
|
### 个人信息 `GET /user/info`
|
||||||
|
|
||||||
|
data:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "马保国",
|
||||||
|
"phone": "13333333333"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 修改个人信息 `POST /user/update`
|
||||||
|
|
||||||
|
Request body:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "宇航员",
|
||||||
|
"phone": "1233333210"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 本地化设置
|
||||||
|
|
||||||
|
#### 获取本地化设置 `GET /user/locale/get`
|
||||||
|
|
||||||
|
data:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"lang": "zh_CN"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 更新本地化设置 `POST /user/locale/update`
|
||||||
|
|
||||||
|
Request body:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"lang": "en_US"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 意见反馈 `POST /report`
|
||||||
|
|
||||||
|
Request body:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"content": "aaa bbbb ccccc"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 我的工单(查询)`GET /user/mytickets`
|
||||||
|
|
||||||
|
data (same as oreo):
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"id": 6830,
|
||||||
|
"type": 1,
|
||||||
|
"status": 5,
|
||||||
|
"device": "主机",
|
||||||
|
"deviceModel": "技嘉",
|
||||||
|
"owner": "武技栏",
|
||||||
|
"phone": "18888888888",
|
||||||
|
"createdTime": "2024-03-06T19:49:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 工单详情
|
||||||
|
|
||||||
|
### 创建工单 `POST /tickets/create`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"type": 1, // 电器是0,电脑是1(bushi)
|
||||||
|
"device": "华硕",
|
||||||
|
"deviceModel": "天选3",
|
||||||
|
"owner": "西西弗",
|
||||||
|
"phone": "12333333333",
|
||||||
|
"description": "没法用pd充电",
|
||||||
|
"accessories": [0]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 添加评论 `POST /tickets/addnote`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"id": "id",
|
||||||
|
"content": "为什么 PD 不能充电呢?",
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Data
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "id", // 返回的是评论的 id
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 加入 Oreo `POST /tickets/addtooreo`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"id": 4234
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 认领工单 `POST /tickets/pick`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"id": 4234
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 更新工单状态 `POST /tickets/update`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"id": "id",
|
||||||
|
"status": 3
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 确认已取回 `POST /tickets/retrieve`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"id": "id"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 获取七天内未完成工单 `GET /tickets/uncompleted`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"pageId": 1,
|
||||||
|
"count": 10,
|
||||||
|
"queryType": 0
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 获取所有预填写工单 `GET /tickets/list`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"pageId": 1,
|
||||||
|
"count": 10,
|
||||||
|
"queryType": 0
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 查询预填写工单 `GET /tickets/search`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"values": "test",
|
||||||
|
"pageId": 1,
|
||||||
|
"count": 10,
|
||||||
|
"queryType": 0
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 工单信息 `GET /tickets/info?id={id}`
|
||||||
|
|
||||||
|
data (same as oreo):
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"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",
|
||||||
|
"pic": [], // 只有当 type = 1 (评论) 时 pic 才有可能非空
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"avatar": "https://....jpg",
|
||||||
|
"id": 21370,
|
||||||
|
"op": "宇航员",
|
||||||
|
"type": 2,
|
||||||
|
"content": "1",
|
||||||
|
"createdTime": "2024-03-07T19:58:27.838816",
|
||||||
|
"pic": [], // 只有当 type = 1 (评论) 时 pic 才有可能非空
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"avatar": "https://....jpg",
|
||||||
|
"id": 21373,
|
||||||
|
"op": "宇航员",
|
||||||
|
"type": 2,
|
||||||
|
"content": "4",
|
||||||
|
"createdTime": "2024-03-07T20:28:12.070707",
|
||||||
|
"pic": [], // 只有当 type = 1 (评论) 时 pic 才有可能非空
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"avatar": "https://....jpg",
|
||||||
|
"id": 21374,
|
||||||
|
"op": "宇航员",
|
||||||
|
"type": 2,
|
||||||
|
"content": "5",
|
||||||
|
"createdTime": "2024-03-07T20:30:15.770486",
|
||||||
|
"pic": [], // 只有当 type = 1 (评论) 时 pic 才有可能非空
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"avatar": "https://....jpg",
|
||||||
|
"id": 21374,
|
||||||
|
"op": "宇航员",
|
||||||
|
"type": 1,
|
||||||
|
"content": "清灰换硅脂",
|
||||||
|
"createdTime": "2024-03-07T20:30:15.780486",
|
||||||
|
"pic": [
|
||||||
|
"https://....jpg",
|
||||||
|
...
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"accessories": [2],
|
||||||
|
"picked": false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 成员相关
|
||||||
|
|
||||||
|
### 成员登录 `POST /member/login`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"code": "code_test",
|
||||||
|
}
|
||||||
|
```
|
||||||
|
这里的 code 是来源于小程序扫描统一身份认证生成的二维码
|
||||||
|
|
||||||
|
### 检查 token 是否登陆 `GET /member/checklogin?token={token}` OK
|
||||||
|
|
||||||
|
data
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
|
"name": "宇航员",
|
||||||
|
"phone": "13311451419",
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 成员登出 `POST /member/logout`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 成员值班信息 `GET /member/duty/info`
|
||||||
|
|
||||||
|
#### 当前在值班
|
||||||
|
|
||||||
|
data:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"isInDuty": true, // 指示成员其当前是否在值班
|
||||||
|
"inDutyCnt": 3,
|
||||||
|
"currentDuty": "others",
|
||||||
|
"place": "蓝田", // 只有当 currentDuty 为 others 时,place 才不为空
|
||||||
|
"otherDutyStart": "2024-03-07T11:52:48.523303", // Timestamp
|
||||||
|
"otherDutyEnd": "2024-03-07T13:52:48.523303",
|
||||||
|
"offDutyReason": "",
|
||||||
|
"dutyRecoverTime": ""
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 当前未值班
|
||||||
|
|
||||||
|
data:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"isInDuty": false,
|
||||||
|
"inDutyCnt": 0,
|
||||||
|
"currentDuty": "off", // "0" => 正常值班下班,"others" => 其他值班下班,"off" => 值班暂停
|
||||||
|
"place": "", // 只有当 currentDuty 为 others 时,place 才不为空
|
||||||
|
"otherDutyStart": "",
|
||||||
|
"otherDutyEnd": "",
|
||||||
|
"offDutyReason": "期中考试周",
|
||||||
|
"dutyRecoverTime": "下周一"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 成员请假 `POST /member/askleave`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"week": "1",
|
||||||
|
"shift": "2",
|
||||||
|
"reason": "家庭原因",
|
||||||
|
"substitute": "晓洋" // 未找人代班则为空
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 值班总结上传 `POST /member/conclusion`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"week": "2",
|
||||||
|
"shift": "3",
|
||||||
|
"conclusion": "周四第三班,一人请假,共收两台电脑,均劝退已取回。由上一班交接两台电脑,其中一台维修成功已取回,一台仍在维修。"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 修改值班人数 `POST /member/dutycnt`
|
||||||
|
|
||||||
|
Request
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token": "token_test",
|
||||||
|
"dutycnt": 5,
|
||||||
|
}
|
||||||
|
```
|
||||||
@@ -1,5 +1,159 @@
|
|||||||
export default {
|
import mytickets from './mytickets.json';
|
||||||
'GET /api/user/1': {},
|
import ticketInfo from './ticketInfo.json';
|
||||||
|
import uncompleted from './uncompleted.json';
|
||||||
|
import ticketsList from './ticketsList.json';
|
||||||
|
import ticketsSearch from './ticketSearch.json';
|
||||||
|
|
||||||
'POST /api/upload': {},
|
export default {
|
||||||
|
'GET /ping': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
msg: 'pong',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'GET /duty/info': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
isInDuty: true,
|
||||||
|
inDutyCnt: 3,
|
||||||
|
currentDuty: 'others',
|
||||||
|
otherDutyStart: '2024-03-07T09:30:48.523303',
|
||||||
|
otherDutyEnd: '2024-03-07T13:30:48.523303',
|
||||||
|
place: '蓝田',
|
||||||
|
offDutyReason: '',
|
||||||
|
dutyRecoverTime: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'GET /user/info': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
name: '马保国',
|
||||||
|
phone: 13333333333,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'POST /user/update': {
|
||||||
|
success: true,
|
||||||
|
data: {},
|
||||||
|
},
|
||||||
|
'GET /user/locale/get': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
lang: 'zh_CN',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'POST /user/locale/update': {
|
||||||
|
success: true,
|
||||||
|
data: {},
|
||||||
|
},
|
||||||
|
'POST /report': {
|
||||||
|
success: true,
|
||||||
|
data: {},
|
||||||
|
},
|
||||||
|
'GET /user/mytickets': {
|
||||||
|
success: true,
|
||||||
|
data: mytickets,
|
||||||
|
},
|
||||||
|
'GET /tickets/info': {
|
||||||
|
success: true,
|
||||||
|
data: ticketInfo,
|
||||||
|
},
|
||||||
|
'POST /tickets/addnote': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
id: 114,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'POST /tickets/create': {
|
||||||
|
success: true,
|
||||||
|
data: {},
|
||||||
|
},
|
||||||
|
'POST /tickets/addtooreo': {
|
||||||
|
success: true,
|
||||||
|
data: {},
|
||||||
|
},
|
||||||
|
'POST /tickets/pick': {
|
||||||
|
success: true,
|
||||||
|
data: {},
|
||||||
|
},
|
||||||
|
'POST /tickets/update': {
|
||||||
|
success: true,
|
||||||
|
data: {},
|
||||||
|
},
|
||||||
|
'POST /tickets/retrieve': {
|
||||||
|
success: true,
|
||||||
|
data: {},
|
||||||
|
},
|
||||||
|
'POST /member/login': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
avatar:
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
|
||||||
|
name: '宇航员',
|
||||||
|
phone: '13311451419',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'GET /tickets/uncompleted': {
|
||||||
|
success: true,
|
||||||
|
data: uncompleted,
|
||||||
|
},
|
||||||
|
'GET /tickets/list': {
|
||||||
|
success: true,
|
||||||
|
data: ticketsList,
|
||||||
|
},
|
||||||
|
'GET /tickets/search': {
|
||||||
|
success: true,
|
||||||
|
data: ticketsSearch,
|
||||||
|
},
|
||||||
|
'POST /member/logout': {
|
||||||
|
success: true,
|
||||||
|
},
|
||||||
|
'POST /member/checklogin': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
avatar:
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
|
||||||
|
name: '宇航员',
|
||||||
|
phone: '13311451419',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'GET /member/duty/info': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
isInDuty: true,
|
||||||
|
inDutyCnt: 3,
|
||||||
|
currentDuty: 'others',
|
||||||
|
otherDutyStart: '2024-03-07T09:30:48.523303',
|
||||||
|
otherDutyEnd: '2024-03-07T13:30:48.523303',
|
||||||
|
place: '蓝田',
|
||||||
|
offDutyReason: '',
|
||||||
|
dutyRecoverTime: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'POST /member/askleave': {
|
||||||
|
success: true,
|
||||||
|
},
|
||||||
|
'POST /login': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
token: '__token_test_zjueva1984__',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'GET /checklogin': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
islogin: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'POST /upload/pic': {
|
||||||
|
success: true,
|
||||||
|
},
|
||||||
|
'POST /member/conclusion': {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
id: 514,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'POST /member/dutycnt': {
|
||||||
|
success: true,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"id": 6830,
|
||||||
|
"type": 1,
|
||||||
|
"status": 3,
|
||||||
|
"device": "主机",
|
||||||
|
"deviceModel": "技嘉",
|
||||||
|
"owner": "武技栏",
|
||||||
|
"phone": "18888888888",
|
||||||
|
"createdTime": "2024-03-06T19:49:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6831,
|
||||||
|
"type": 1,
|
||||||
|
"status": 2,
|
||||||
|
"device": "ROG",
|
||||||
|
"deviceModel": "幻 14",
|
||||||
|
"owner": "晓洋",
|
||||||
|
"phone": "18888888887",
|
||||||
|
"createdTime": "2024-03-06T19:49:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
"id": 6830,
|
||||||
|
"type": 1,
|
||||||
|
"device": "华硕",
|
||||||
|
"deviceModel": "灵耀X14",
|
||||||
|
"owner": "唐姐姐",
|
||||||
|
"phone": "15555555555",
|
||||||
|
"description": "清灰",
|
||||||
|
"workers": ["宇航员"],
|
||||||
|
"createdTime": "2024-03-07T19:52:48.523303",
|
||||||
|
"status": 4,
|
||||||
|
"isConfirmed": false,
|
||||||
|
"notes": [
|
||||||
|
{
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
|
"id": 21368,
|
||||||
|
"op": "宇航员",
|
||||||
|
"type": 0,
|
||||||
|
"content": "",
|
||||||
|
"createdTime": "2024-03-07T19:52:48.523305",
|
||||||
|
"pic": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
|
"id": 21370,
|
||||||
|
"op": "宇航员",
|
||||||
|
"type": 2,
|
||||||
|
"content": "1",
|
||||||
|
"createdTime": "2024-03-07T19:58:27.838816",
|
||||||
|
"pic": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
|
"id": 21373,
|
||||||
|
"op": "宇航员",
|
||||||
|
"type": 2,
|
||||||
|
"content": "4",
|
||||||
|
"createdTime": "2024-03-07T20:28:12.070707",
|
||||||
|
"pic": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
|
"id": 21374,
|
||||||
|
"op": "宇航员",
|
||||||
|
"type": 2,
|
||||||
|
"content": "5",
|
||||||
|
"createdTime": "2024-03-07T20:30:15.770486",
|
||||||
|
"pic": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
|
"id": 21374,
|
||||||
|
"op": "宇航员",
|
||||||
|
"type": 1,
|
||||||
|
"content": "清灰换硅脂",
|
||||||
|
"createdTime": "2024-03-07T20:30:15.780486",
|
||||||
|
"pic": [
|
||||||
|
"https://storage.360buyimg.com/mtd/home/111543234387022.jpg",
|
||||||
|
"https://storage.360buyimg.com/mtd/home/221543234387016.jpg",
|
||||||
|
"https://storage.360buyimg.com/mtd/home/331543234387025.jpg"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"accessories": [2],
|
||||||
|
"picked": false
|
||||||
|
}
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
{
|
||||||
|
"pageIndex": 1,
|
||||||
|
"pageCount": 20,
|
||||||
|
"size": 10,
|
||||||
|
"queryType": 0,
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"id": 6830,
|
||||||
|
"type": 1,
|
||||||
|
"status": 2,
|
||||||
|
"device": "主机",
|
||||||
|
"deviceModel": "马嘉祺",
|
||||||
|
"owner": "马嘉祺",
|
||||||
|
"phone": "18888888888",
|
||||||
|
"createdTime": "2024-03-06T19:49:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6831,
|
||||||
|
"type": 0,
|
||||||
|
"status": 0,
|
||||||
|
"device": "小米",
|
||||||
|
"deviceModel": "丁晨曦",
|
||||||
|
"owner": "丁晨曦",
|
||||||
|
"phone": "18888888887",
|
||||||
|
"createdTime": "2024-03-06T11:45:14.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6832,
|
||||||
|
"type": 1,
|
||||||
|
"status": 1,
|
||||||
|
"device": "华硕",
|
||||||
|
"deviceModel": "宋亚轩",
|
||||||
|
"owner": "宋亚轩",
|
||||||
|
"phone": "18888888886",
|
||||||
|
"createdTime": "2024-03-06T19:48:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6833,
|
||||||
|
"type": 1,
|
||||||
|
"status": 3,
|
||||||
|
"device": "联想",
|
||||||
|
"deviceModel": "刘耀文",
|
||||||
|
"owner": "刘耀文",
|
||||||
|
"phone": "18888888885",
|
||||||
|
"createdTime": "2024-03-06T14:49:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6834,
|
||||||
|
"type": 1,
|
||||||
|
"status": 4,
|
||||||
|
"device": "ROG",
|
||||||
|
"deviceModel": "张震远",
|
||||||
|
"owner": "张震远",
|
||||||
|
"phone": "18888888884",
|
||||||
|
"createdTime": "2024-03-06T19:49:17.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6835,
|
||||||
|
"type": 1,
|
||||||
|
"status": 5,
|
||||||
|
"device": "荣耀",
|
||||||
|
"deviceModel": "言好像",
|
||||||
|
"owner": "言好像",
|
||||||
|
"phone": "18888888883",
|
||||||
|
"createdTime": "2024-03-06T19:39:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6836,
|
||||||
|
"type": 1,
|
||||||
|
"status": 6,
|
||||||
|
"device": "ROG",
|
||||||
|
"deviceModel": "何君琳",
|
||||||
|
"owner": "何君琳",
|
||||||
|
"phone": "18888888882",
|
||||||
|
"createdTime": "2024-03-06T09:49:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6837,
|
||||||
|
"type": 1,
|
||||||
|
"status": 7,
|
||||||
|
"device": "EVA",
|
||||||
|
"deviceModel": "Echo",
|
||||||
|
"owner": "Echo",
|
||||||
|
"phone": "18888888881",
|
||||||
|
"createdTime": "2024-03-16T19:49:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6838,
|
||||||
|
"type": 0,
|
||||||
|
"status": 2,
|
||||||
|
"device": "罗技",
|
||||||
|
"deviceModel": "SB",
|
||||||
|
"owner": "SB",
|
||||||
|
"phone": "18888888880",
|
||||||
|
"createdTime": "2024-04-06T19:49:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6839,
|
||||||
|
"type": 0,
|
||||||
|
"status": 3,
|
||||||
|
"device": "HAL",
|
||||||
|
"deviceModel": "CNM",
|
||||||
|
"owner": "CNM",
|
||||||
|
"phone": "18888888877",
|
||||||
|
"createdTime": "2024-03-09T19:49:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
{
|
||||||
|
"pageIndex": 1,
|
||||||
|
"pageCount": 24,
|
||||||
|
"size": 8,
|
||||||
|
"queryType": 0,
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"id": 6830,
|
||||||
|
"type": 1,
|
||||||
|
"status": 2,
|
||||||
|
"device": "主机",
|
||||||
|
"deviceModel": "技嘉",
|
||||||
|
"owner": "武技栏",
|
||||||
|
"phone": "18888888888",
|
||||||
|
"createdTime": "2024-03-06T19:49:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6831,
|
||||||
|
"type": 0,
|
||||||
|
"status": 0,
|
||||||
|
"device": "小米",
|
||||||
|
"deviceModel": "电风扇",
|
||||||
|
"owner": "丁真",
|
||||||
|
"phone": "18888888887",
|
||||||
|
"createdTime": "2024-03-06T11:45:14.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6832,
|
||||||
|
"type": 1,
|
||||||
|
"status": 1,
|
||||||
|
"device": "华硕",
|
||||||
|
"deviceModel": "天选 3",
|
||||||
|
"owner": "西西弗",
|
||||||
|
"phone": "18888888886",
|
||||||
|
"createdTime": "2024-03-06T19:48:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6833,
|
||||||
|
"type": 1,
|
||||||
|
"status": 3,
|
||||||
|
"device": "联想",
|
||||||
|
"deviceModel": "ThinkPad X1 Carbon",
|
||||||
|
"owner": "宇航员",
|
||||||
|
"phone": "18888888885",
|
||||||
|
"createdTime": "2024-03-06T14:49:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6834,
|
||||||
|
"type": 1,
|
||||||
|
"status": 4,
|
||||||
|
"device": "ROG",
|
||||||
|
"deviceModel": "魔霸 7 Plus",
|
||||||
|
"owner": "约书亚",
|
||||||
|
"phone": "18888888884",
|
||||||
|
"createdTime": "2024-03-06T19:49:17.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6835,
|
||||||
|
"type": 1,
|
||||||
|
"status": 5,
|
||||||
|
"device": "荣耀",
|
||||||
|
"deviceModel": "触屏笔记本",
|
||||||
|
"owner": "玉米",
|
||||||
|
"phone": "18888888883",
|
||||||
|
"createdTime": "2024-03-06T19:39:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6836,
|
||||||
|
"type": 1,
|
||||||
|
"status": 6,
|
||||||
|
"device": "ROG",
|
||||||
|
"deviceModel": "幻 14",
|
||||||
|
"owner": "晓洋",
|
||||||
|
"phone": "18888888882",
|
||||||
|
"createdTime": "2024-03-06T09:49:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6839,
|
||||||
|
"type": 0,
|
||||||
|
"status": 7,
|
||||||
|
"device": "HAL",
|
||||||
|
"deviceModel": "卡比手办",
|
||||||
|
"owner": "蘑菇云",
|
||||||
|
"phone": "18888888877",
|
||||||
|
"createdTime": "2024-03-09T19:49:27.043865",
|
||||||
|
"isConfirmed": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"id": 6832,
|
||||||
|
"type": 1,
|
||||||
|
"status": 2,
|
||||||
|
"device": "ROG",
|
||||||
|
"deviceModel": "幻 14 2022",
|
||||||
|
"owner": "晓洋",
|
||||||
|
"phone": "18888888887",
|
||||||
|
"createdTime": "2024-03-07T11:45:14.191981",
|
||||||
|
"isConfirmed": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -12,7 +12,6 @@
|
|||||||
"@tarojs/components": "3.6.24",
|
"@tarojs/components": "3.6.24",
|
||||||
"@tarojs/helper": "3.6.24",
|
"@tarojs/helper": "3.6.24",
|
||||||
"@tarojs/plugin-framework-react": "3.6.24",
|
"@tarojs/plugin-framework-react": "3.6.24",
|
||||||
"@tarojs/plugin-mock": "^0.0.9",
|
|
||||||
"@tarojs/plugin-platform-alipay": "3.6.24",
|
"@tarojs/plugin-platform-alipay": "3.6.24",
|
||||||
"@tarojs/plugin-platform-harmony-hybrid": "3.6.24",
|
"@tarojs/plugin-platform-harmony-hybrid": "3.6.24",
|
||||||
"@tarojs/plugin-platform-jd": "3.6.24",
|
"@tarojs/plugin-platform-jd": "3.6.24",
|
||||||
@@ -24,6 +23,8 @@
|
|||||||
"@tarojs/runtime": "3.6.24",
|
"@tarojs/runtime": "3.6.24",
|
||||||
"@tarojs/shared": "3.6.24",
|
"@tarojs/shared": "3.6.24",
|
||||||
"@tarojs/taro": "3.6.24",
|
"@tarojs/taro": "3.6.24",
|
||||||
|
"moment": "^2.30.1",
|
||||||
|
"process": "^0.11.10",
|
||||||
"react": "^18.0.0",
|
"react": "^18.0.0",
|
||||||
"react-dom": "^18.0.0",
|
"react-dom": "^18.0.0",
|
||||||
"taro-ui": "^3.3.0"
|
"taro-ui": "^3.3.0"
|
||||||
@@ -32,7 +33,8 @@
|
|||||||
"@babel/core": "^7.8.0",
|
"@babel/core": "^7.8.0",
|
||||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
|
||||||
"@tarojs/cli": "3.6.24",
|
"@tarojs/cli": "3.6.24",
|
||||||
"@tarojs/plugin-platform-h5": "^3.6.24",
|
"@tarojs/plugin-mock": "^0.0.9",
|
||||||
|
"@tarojs/plugin-platform-h5": "3.6.24",
|
||||||
"@tarojs/taro-loader": "3.6.24",
|
"@tarojs/taro-loader": "3.6.24",
|
||||||
"@tarojs/test-utils-react": "^0.1.1",
|
"@tarojs/test-utils-react": "^0.1.1",
|
||||||
"@tarojs/webpack5-runner": "3.6.24",
|
"@tarojs/webpack5-runner": "3.6.24",
|
||||||
@@ -54,6 +56,7 @@
|
|||||||
"jest": "^29.3.1",
|
"jest": "^29.3.1",
|
||||||
"jest-environment-jsdom": "^29.5.0",
|
"jest-environment-jsdom": "^29.5.0",
|
||||||
"lint-staged": "^15.2.2",
|
"lint-staged": "^15.2.2",
|
||||||
|
"mockjs": "^1.1.0",
|
||||||
"postcss": "^8.4.18",
|
"postcss": "^8.4.18",
|
||||||
"react-refresh": "^0.11.0",
|
"react-refresh": "^0.11.0",
|
||||||
"stylelint": "^14.4.0",
|
"stylelint": "^14.4.0",
|
||||||
@@ -8842,6 +8845,7 @@
|
|||||||
"version": "0.0.9",
|
"version": "0.0.9",
|
||||||
"resolved": "https://registry.npmmirror.com/@tarojs/plugin-mock/-/plugin-mock-0.0.9.tgz",
|
"resolved": "https://registry.npmmirror.com/@tarojs/plugin-mock/-/plugin-mock-0.0.9.tgz",
|
||||||
"integrity": "sha512-Q4z4lHp2mHVByQJ8gtIq0Rct8vkEqvCmyTmv+EJNf9sJY3F5H1fmDNfgMVn2fyZj7TmxuSMq/FDtgNlEA4eTow==",
|
"integrity": "sha512-Q4z4lHp2mHVByQJ8gtIq0Rct8vkEqvCmyTmv+EJNf9sJY3F5H1fmDNfgMVn2fyZj7TmxuSMq/FDtgNlEA4eTow==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
@@ -8856,17 +8860,16 @@
|
|||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmmirror.com/get-port/-/get-port-5.1.1.tgz",
|
"resolved": "https://registry.npmmirror.com/get-port/-/get-port-5.1.1.tgz",
|
||||||
"integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==",
|
"integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==",
|
||||||
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tarojs/plugin-mock/node_modules/http-proxy-middleware": {
|
"node_modules/@tarojs/plugin-mock/node_modules/http-proxy-middleware": {
|
||||||
"version": "1.3.1",
|
"version": "1.3.1",
|
||||||
"resolved": "https://registry.npmmirror.com/http-proxy-middleware/-/http-proxy-middleware-1.3.1.tgz",
|
"resolved": "https://registry.npmmirror.com/http-proxy-middleware/-/http-proxy-middleware-1.3.1.tgz",
|
||||||
"integrity": "sha512-13eVVDYS4z79w7f1+NPllJtOQFx/FdUW4btIvVRMaRlUY9VGstAbo5MOhLEuUgZFRHn3x50ufn25zkj/boZnEg==",
|
"integrity": "sha512-13eVVDYS4z79w7f1+NPllJtOQFx/FdUW4btIvVRMaRlUY9VGstAbo5MOhLEuUgZFRHn3x50ufn25zkj/boZnEg==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/http-proxy": "^1.17.5",
|
"@types/http-proxy": "^1.17.5",
|
||||||
"http-proxy": "^1.18.1",
|
"http-proxy": "^1.18.1",
|
||||||
@@ -8882,17 +8885,16 @@
|
|||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz",
|
||||||
"integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==",
|
"integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==",
|
||||||
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tarojs/plugin-mock/node_modules/path-to-regexp": {
|
"node_modules/@tarojs/plugin-mock/node_modules/path-to-regexp": {
|
||||||
"version": "6.2.1",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-6.2.1.tgz",
|
"resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-6.2.1.tgz",
|
||||||
"integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw=="
|
"integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@tarojs/plugin-platform-alipay": {
|
"node_modules/@tarojs/plugin-platform-alipay": {
|
||||||
"version": "3.6.24",
|
"version": "3.6.24",
|
||||||
@@ -9694,6 +9696,7 @@
|
|||||||
"version": "1.17.14",
|
"version": "1.17.14",
|
||||||
"resolved": "https://registry.npmmirror.com/@types/http-proxy/-/http-proxy-1.17.14.tgz",
|
"resolved": "https://registry.npmmirror.com/@types/http-proxy/-/http-proxy-1.17.14.tgz",
|
||||||
"integrity": "sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==",
|
"integrity": "sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
@@ -11062,7 +11065,8 @@
|
|||||||
"node_modules/array-flatten": {
|
"node_modules/array-flatten": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-1.1.1.tgz",
|
"resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-1.1.1.tgz",
|
||||||
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
|
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/array-includes": {
|
"node_modules/array-includes": {
|
||||||
"version": "3.1.7",
|
"version": "3.1.7",
|
||||||
@@ -13628,6 +13632,7 @@
|
|||||||
"version": "0.5.4",
|
"version": "0.5.4",
|
||||||
"resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-0.5.4.tgz",
|
"resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-0.5.4.tgz",
|
||||||
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
|
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"safe-buffer": "5.2.1"
|
"safe-buffer": "5.2.1"
|
||||||
},
|
},
|
||||||
@@ -13652,6 +13657,7 @@
|
|||||||
"version": "0.5.0",
|
"version": "0.5.0",
|
||||||
"resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.5.0.tgz",
|
"resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.5.0.tgz",
|
||||||
"integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
|
"integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
|
||||||
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
@@ -13659,7 +13665,8 @@
|
|||||||
"node_modules/cookie-signature": {
|
"node_modules/cookie-signature": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
"resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
||||||
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
|
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/copy-anything": {
|
"node_modules/copy-anything": {
|
||||||
"version": "2.0.6",
|
"version": "2.0.6",
|
||||||
@@ -13858,6 +13865,7 @@
|
|||||||
"version": "2.8.5",
|
"version": "2.8.5",
|
||||||
"resolved": "https://registry.npmmirror.com/cors/-/cors-2.8.5.tgz",
|
"resolved": "https://registry.npmmirror.com/cors/-/cors-2.8.5.tgz",
|
||||||
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
|
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"object-assign": "^4",
|
"object-assign": "^4",
|
||||||
"vary": "^1"
|
"vary": "^1"
|
||||||
@@ -16697,7 +16705,8 @@
|
|||||||
"node_modules/eventemitter3": {
|
"node_modules/eventemitter3": {
|
||||||
"version": "4.0.7",
|
"version": "4.0.7",
|
||||||
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz",
|
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz",
|
||||||
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
|
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/events": {
|
"node_modules/events": {
|
||||||
"version": "3.3.0",
|
"version": "3.3.0",
|
||||||
@@ -17426,6 +17435,7 @@
|
|||||||
"version": "4.18.3",
|
"version": "4.18.3",
|
||||||
"resolved": "https://registry.npmmirror.com/express/-/express-4.18.3.tgz",
|
"resolved": "https://registry.npmmirror.com/express/-/express-4.18.3.tgz",
|
||||||
"integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==",
|
"integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"accepts": "~1.3.8",
|
"accepts": "~1.3.8",
|
||||||
"array-flatten": "1.1.1",
|
"array-flatten": "1.1.1",
|
||||||
@@ -17467,6 +17477,7 @@
|
|||||||
"version": "2.6.9",
|
"version": "2.6.9",
|
||||||
"resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz",
|
"resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz",
|
||||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ms": "2.0.0"
|
"ms": "2.0.0"
|
||||||
}
|
}
|
||||||
@@ -17474,17 +17485,20 @@
|
|||||||
"node_modules/express/node_modules/ms": {
|
"node_modules/express/node_modules/ms": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz",
|
||||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/express/node_modules/path-to-regexp": {
|
"node_modules/express/node_modules/path-to-regexp": {
|
||||||
"version": "0.1.7",
|
"version": "0.1.7",
|
||||||
"resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
"resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
||||||
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
|
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/express/node_modules/qs": {
|
"node_modules/express/node_modules/qs": {
|
||||||
"version": "6.11.0",
|
"version": "6.11.0",
|
||||||
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.11.0.tgz",
|
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.11.0.tgz",
|
||||||
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
|
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"side-channel": "^1.0.4"
|
"side-channel": "^1.0.4"
|
||||||
},
|
},
|
||||||
@@ -17865,6 +17879,7 @@
|
|||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-1.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-1.2.0.tgz",
|
||||||
"integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
|
"integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": "2.6.9",
|
"debug": "2.6.9",
|
||||||
"encodeurl": "~1.0.2",
|
"encodeurl": "~1.0.2",
|
||||||
@@ -17882,6 +17897,7 @@
|
|||||||
"version": "2.6.9",
|
"version": "2.6.9",
|
||||||
"resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz",
|
"resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz",
|
||||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ms": "2.0.0"
|
"ms": "2.0.0"
|
||||||
}
|
}
|
||||||
@@ -17889,7 +17905,8 @@
|
|||||||
"node_modules/finalhandler/node_modules/ms": {
|
"node_modules/finalhandler/node_modules/ms": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz",
|
||||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/find-babel-config": {
|
"node_modules/find-babel-config": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
@@ -18095,6 +18112,7 @@
|
|||||||
"version": "1.15.5",
|
"version": "1.15.5",
|
||||||
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.5.tgz",
|
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.5.tgz",
|
||||||
"integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==",
|
"integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==",
|
||||||
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "individual",
|
"type": "individual",
|
||||||
@@ -18187,6 +18205,7 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz",
|
||||||
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
||||||
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
@@ -19358,6 +19377,7 @@
|
|||||||
"version": "1.18.1",
|
"version": "1.18.1",
|
||||||
"resolved": "https://registry.npmmirror.com/http-proxy/-/http-proxy-1.18.1.tgz",
|
"resolved": "https://registry.npmmirror.com/http-proxy/-/http-proxy-1.18.1.tgz",
|
||||||
"integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
|
"integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"eventemitter3": "^4.0.0",
|
"eventemitter3": "^4.0.0",
|
||||||
"follow-redirects": "^1.0.0",
|
"follow-redirects": "^1.0.0",
|
||||||
@@ -24533,7 +24553,8 @@
|
|||||||
"node_modules/merge-descriptors": {
|
"node_modules/merge-descriptors": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||||
"integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
|
"integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/merge-options": {
|
"node_modules/merge-options": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
@@ -24591,6 +24612,7 @@
|
|||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/methods/-/methods-1.1.2.tgz",
|
"resolved": "https://registry.npmmirror.com/methods/-/methods-1.1.2.tgz",
|
||||||
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
|
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
|
||||||
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
@@ -26347,6 +26369,26 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/mobile-detect/-/mobile-detect-1.4.5.tgz",
|
"resolved": "https://registry.npmmirror.com/mobile-detect/-/mobile-detect-1.4.5.tgz",
|
||||||
"integrity": "sha512-yc0LhH6tItlvfLBugVUEtgawwFU2sIe+cSdmRJJCTMZ5GEJyLxNyC/NIOAOGk67Fa8GNpOttO3Xz/1bHpXFD/g=="
|
"integrity": "sha512-yc0LhH6tItlvfLBugVUEtgawwFU2sIe+cSdmRJJCTMZ5GEJyLxNyC/NIOAOGk67Fa8GNpOttO3Xz/1bHpXFD/g=="
|
||||||
},
|
},
|
||||||
|
"node_modules/mockjs": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/mockjs/-/mockjs-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-eQsKcWzIaZzEZ07NuEyO4Nw65g0hdWAyurVol1IPl1gahRwY+svqzfgfey8U8dahLwG44d6/RwEzuK52rSa/JQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"commander": "*"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"random": "bin/random"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/moment": {
|
||||||
|
"version": "2.30.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/moment/-/moment-2.30.1.tgz",
|
||||||
|
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ms": {
|
"node_modules/ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
|
||||||
@@ -29237,6 +29279,14 @@
|
|||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/process": {
|
||||||
|
"version": "0.11.10",
|
||||||
|
"resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz",
|
||||||
|
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/process-nextick-args": {
|
"node_modules/process-nextick-args": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||||
@@ -29313,6 +29363,7 @@
|
|||||||
"version": "2.0.7",
|
"version": "2.0.7",
|
||||||
"resolved": "https://registry.npmmirror.com/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
"resolved": "https://registry.npmmirror.com/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
||||||
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"forwarded": "0.2.0",
|
"forwarded": "0.2.0",
|
||||||
"ipaddr.js": "1.9.1"
|
"ipaddr.js": "1.9.1"
|
||||||
@@ -29325,6 +29376,7 @@
|
|||||||
"version": "1.9.1",
|
"version": "1.9.1",
|
||||||
"resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
"resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
||||||
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
||||||
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.10"
|
"node": ">= 0.10"
|
||||||
}
|
}
|
||||||
@@ -31170,6 +31222,7 @@
|
|||||||
"version": "5.2.1",
|
"version": "5.2.1",
|
||||||
"resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
"resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||||
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"build:jd": "taro build --type jd",
|
"build:jd": "taro build --type jd",
|
||||||
"build:quickapp": "taro build --type quickapp",
|
"build:quickapp": "taro build --type quickapp",
|
||||||
"build:harmony-hybrid": "taro build --type harmony-hybrid",
|
"build:harmony-hybrid": "taro build --type harmony-hybrid",
|
||||||
"dev:weapp": "npm run build:weapp -- --watch",
|
"dev:weapp": "npm run build:weapp -- --watch --mode dev",
|
||||||
"dev:swan": "npm run build:swan -- --watch",
|
"dev:swan": "npm run build:swan -- --watch",
|
||||||
"dev:alipay": "npm run build:alipay -- --watch",
|
"dev:alipay": "npm run build:alipay -- --watch",
|
||||||
"dev:tt": "npm run build:tt -- --watch",
|
"dev:tt": "npm run build:tt -- --watch",
|
||||||
@@ -44,7 +44,6 @@
|
|||||||
"@tarojs/components": "3.6.24",
|
"@tarojs/components": "3.6.24",
|
||||||
"@tarojs/helper": "3.6.24",
|
"@tarojs/helper": "3.6.24",
|
||||||
"@tarojs/plugin-framework-react": "3.6.24",
|
"@tarojs/plugin-framework-react": "3.6.24",
|
||||||
"@tarojs/plugin-mock": "^0.0.9",
|
|
||||||
"@tarojs/plugin-platform-alipay": "3.6.24",
|
"@tarojs/plugin-platform-alipay": "3.6.24",
|
||||||
"@tarojs/plugin-platform-harmony-hybrid": "3.6.24",
|
"@tarojs/plugin-platform-harmony-hybrid": "3.6.24",
|
||||||
"@tarojs/plugin-platform-jd": "3.6.24",
|
"@tarojs/plugin-platform-jd": "3.6.24",
|
||||||
@@ -56,6 +55,8 @@
|
|||||||
"@tarojs/runtime": "3.6.24",
|
"@tarojs/runtime": "3.6.24",
|
||||||
"@tarojs/shared": "3.6.24",
|
"@tarojs/shared": "3.6.24",
|
||||||
"@tarojs/taro": "3.6.24",
|
"@tarojs/taro": "3.6.24",
|
||||||
|
"moment": "^2.30.1",
|
||||||
|
"process": "^0.11.10",
|
||||||
"react": "^18.0.0",
|
"react": "^18.0.0",
|
||||||
"react-dom": "^18.0.0",
|
"react-dom": "^18.0.0",
|
||||||
"taro-ui": "^3.3.0"
|
"taro-ui": "^3.3.0"
|
||||||
@@ -64,7 +65,8 @@
|
|||||||
"@babel/core": "^7.8.0",
|
"@babel/core": "^7.8.0",
|
||||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
|
||||||
"@tarojs/cli": "3.6.24",
|
"@tarojs/cli": "3.6.24",
|
||||||
"@tarojs/plugin-platform-h5": "^3.6.24",
|
"@tarojs/plugin-mock": "^0.0.9",
|
||||||
|
"@tarojs/plugin-platform-h5": "3.6.24",
|
||||||
"@tarojs/taro-loader": "3.6.24",
|
"@tarojs/taro-loader": "3.6.24",
|
||||||
"@tarojs/test-utils-react": "^0.1.1",
|
"@tarojs/test-utils-react": "^0.1.1",
|
||||||
"@tarojs/webpack5-runner": "3.6.24",
|
"@tarojs/webpack5-runner": "3.6.24",
|
||||||
@@ -86,6 +88,7 @@
|
|||||||
"jest": "^29.3.1",
|
"jest": "^29.3.1",
|
||||||
"jest-environment-jsdom": "^29.5.0",
|
"jest-environment-jsdom": "^29.5.0",
|
||||||
"lint-staged": "^15.2.2",
|
"lint-staged": "^15.2.2",
|
||||||
|
"mockjs": "^1.1.0",
|
||||||
"postcss": "^8.4.18",
|
"postcss": "^8.4.18",
|
||||||
"react-refresh": "^0.11.0",
|
"react-refresh": "^0.11.0",
|
||||||
"stylelint": "^14.4.0",
|
"stylelint": "^14.4.0",
|
||||||
@@ -95,6 +98,7 @@
|
|||||||
"webpack": "5.78.0"
|
"webpack": "5.78.0"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*": "prettier --write"
|
"*.ts": "prettier --write",
|
||||||
|
"*.tsx": "prettier --write"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"enhance": false,
|
"enhance": false,
|
||||||
"compileHotReLoad": false,
|
"compileHotReLoad": false,
|
||||||
"postcss": false,
|
"postcss": false,
|
||||||
"minified": false,
|
"minified": true,
|
||||||
"babelSetting": {
|
"babelSetting": {
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"disablePlugins": [],
|
"disablePlugins": [],
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||||
"projectname": "EVA-Notify",
|
"projectname": "EVA-Notify",
|
||||||
"setting": {
|
"setting": {
|
||||||
"compileHotReLoad": true
|
"compileHotReLoad": true,
|
||||||
|
"urlCheck": true,
|
||||||
|
"bigPackageSizeSupport": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,19 @@
|
|||||||
export default defineAppConfig({
|
export default defineAppConfig({
|
||||||
pages: [
|
pages: [
|
||||||
|
'pages/Loading/Loading',
|
||||||
'pages/index/index',
|
'pages/index/index',
|
||||||
'pages/repair/repair',
|
'pages/repair/repair',
|
||||||
'pages/user/user',
|
'pages/user/user',
|
||||||
|
'pages/user/myTicket/myTicket',
|
||||||
'pages/user/inform/inform',
|
'pages/user/inform/inform',
|
||||||
'pages/user/settings/settings',
|
'pages/user/about/about',
|
||||||
|
'pages/user/report/report',
|
||||||
|
'pages/user/member/member',
|
||||||
|
'pages/TicketDetail/TicketDetail',
|
||||||
|
'pages/TicketList/TicketList',
|
||||||
|
'pages/AskLeave/AskLeave',
|
||||||
|
'pages/Conclusion/Conclusion',
|
||||||
|
'pages/404/404',
|
||||||
],
|
],
|
||||||
window: {
|
window: {
|
||||||
backgroundTextStyle: 'light',
|
backgroundTextStyle: 'light',
|
||||||
|
|||||||
@@ -2,12 +2,13 @@ import { PropsWithChildren } from 'react';
|
|||||||
import { useLaunch } from '@tarojs/taro';
|
import { useLaunch } from '@tarojs/taro';
|
||||||
import 'taro-ui/dist/style/index.scss';
|
import 'taro-ui/dist/style/index.scss';
|
||||||
import './app.scss';
|
import './app.scss';
|
||||||
|
import { pingAte } from './service/pingAte';
|
||||||
|
|
||||||
function App({ children }: PropsWithChildren<any>) {
|
function App({ children }: PropsWithChildren<any>) {
|
||||||
useLaunch(() => {
|
useLaunch(() => {
|
||||||
console.log('App launched.');
|
console.log('App launched.');
|
||||||
|
pingAte();
|
||||||
});
|
});
|
||||||
|
|
||||||
// children 是将要会渲染的页面
|
// children 是将要会渲染的页面
|
||||||
return children;
|
return children;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1710991023487" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12657" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24"><path d="M512 42.666667q95.658667 0 182.485333 37.162667t149.674667 100.010667 100.010667 149.674667 37.162667 182.485333-37.162667 182.485333-100.010667 149.674667-149.674667 100.010667-182.485333 37.162667-182.485333-37.162667-149.674667-100.010667-100.010667-149.674667-37.162667-182.485333 37.162667-182.485333 100.010667-149.674667 149.674667-100.010667 182.485333-37.162667zM512 128q-77.994667 0-149.162667 30.506667t-122.496 81.834667-81.834667 122.496-30.506667 149.162667 30.506667 149.162667 81.834667 122.496 122.496 81.834667 149.162667 30.506667 149.162667-30.506667 122.496-81.834667 81.834667-122.496 30.506667-149.162667-30.506667-149.162667-81.834667-122.496-122.496-81.834667-149.162667-30.506667zM512 213.333333q17.664 0 30.165333 12.501333t12.501333 30.165333l0 238.336 115.669333 115.328q12.330667 12.330667 12.330667 30.336t-12.330667 30.336-30.336 12.330667-30.336-12.330667l-128-128q-12.330667-12.330667-12.330667-30.336l0-256q0-17.664 12.501333-30.165333t30.165333-12.501333z" fill="#E69966" p-id="12658"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1710604932901" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4288" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24"><path d="M512 121.6c217.6 0 390.4 172.8 390.4 390.4S729.6 902.4 512 902.4 121.6 729.6 121.6 512 294.4 121.6 512 121.6m0-89.6C246.4 32 32 249.6 32 512s217.6 480 480 480 480-217.6 480-480S774.4 32 512 32z" p-id="4289"></path><path d="M675.2 512H508.8V284.8c0-25.6-19.2-41.6-41.6-41.6H464c-25.6 0-41.6 19.2-41.6 41.6v272c0 25.6 19.2 41.6 41.6 41.6h214.4c25.6 0 44.8-22.4 44.8-44.8s-22.4-41.6-48-41.6z" p-id="4290"></path></svg>
|
||||||
|
After Width: | Height: | Size: 746 B |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1710232513408" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4296" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24"><path d="M816.672 937.344c-8.192 0-16.384-3.136-22.624-9.376l-213.952-213.952c-12.512-12.512-12.512-32.736 0-45.248s32.736-12.512 45.248 0l191.328 191.328 33.408-33.376-190.848-190.848c-12.512-12.512-12.512-32.736 0-45.248s32.736-12.512 45.248 0l213.472 213.472c6.016 6.016 9.376 14.112 9.376 22.624s-3.36 16.64-9.376 22.624l-78.656 78.624C833.024 934.208 824.832 937.344 816.672 937.344z" fill="#5C636E" p-id="4297"></path><path d="M590.752 128c0-0.032 0-0.064 0-0.064 1.472-4.16 2.048-8.352 1.792-12.512 0 0 0 0 0 0 0 0-0.032-0.064-0.032-0.096-0.256-4.128-1.312-8.096-3.104-11.776-0.352-0.704-0.896-1.248-1.28-1.92-1.632-2.848-3.456-5.472-5.952-7.712-0.928-0.864-2.08-1.376-3.136-2.112-1.92-1.376-3.616-3.008-5.888-3.968-0.608-0.256-1.248-0.384-1.888-0.608-0.032 0-0.064-0.032-0.096-0.032-114.144-46.624-243.808-20.704-331.072 66.592C239.328 154.528 239.04 155.584 238.336 156.416 237.472 157.12 236.448 157.408 235.648 158.208L73.664 319.552c-6.016 6.016-9.408 14.144-9.408 22.656s3.36 16.64 9.376 22.656l98.304 98.304c6.016 6.016 14.144 9.376 22.624 9.376s16.64-3.36 22.624-9.376l56.032-56.032 68.192 68.224c6.24 6.24 14.432 9.376 22.624 9.376s16.384-3.136 22.624-9.376c12.512-12.48 12.512-32.736 0-45.248l-90.816-90.848c-12.512-12.512-32.736-12.512-45.248 0L194.56 395.296l-52.992-53.024 139.264-138.72c0.832-0.8 1.12-1.888 1.824-2.752 0.864-0.704 1.92-0.992 2.72-1.824 40-39.936 91.296-63.072 144.864-68.768-2.208 1.664-4.384 3.392-6.56 5.12-8.96 6.784-17.632 14.016-25.664 22.048-0.544 0.544-0.736 1.248-1.216 1.824-19.232 19.36-35.936 41.024-49.568 64.512-2.464 4.224-4.768 8.448-7.008 12.736l0.416 0.224c-12.288 24.64-12.288 53.664 0.48 78.144 1.536 2.944 3.52 5.504 5.76 7.744 0.768 0.96 1.088 2.112 1.984 2.976l70.432 70.464c6.24 6.24 14.432 9.376 22.624 9.376s16.384-3.136 22.624-9.376c12.512-12.48 12.512-32.736 0-45.248l-67.072-67.072c-2.624-6.112-2.688-13.024 0.448-18.976 0.16-0.288 0.128-0.608 0.256-0.896 1.44-2.656 2.848-5.344 4.384-7.968 11.008-18.944 24.48-36.448 40.064-52.032 4.096-4.096 8.608-7.648 12.96-11.456 30.144-25.28 67.232-40.864 106.816-43.136 0.576-0.032 1.056-0.352 1.632-0.416 3.616-0.384 7.104-1.184 10.368-2.72 0.512-0.256 0.896-0.64 1.376-0.896 3.168-1.696 6.048-3.776 8.512-6.496 0.256-0.288 0.384-0.64 0.608-0.928 2.08-2.464 4.128-4.928 5.44-8.064C590.624 129.12 590.528 128.544 590.752 128z" fill="#5C636E" p-id="4298"></path><path d="M289.536 960.032c-28.384 0-56.928-6.368-82.624-18.432-9.408-4.448-16.096-13.184-17.888-23.456-1.792-10.24 1.504-20.736 8.896-28.128l88.064-88.096-33.056-33.024-87.52 87.488c-7.424 7.424-18.048 10.848-28.384 8.832-10.336-1.888-19.104-8.704-23.392-18.304-32.736-72.64-17.088-159.072 38.944-215.104 50.048-50.08 126.048-68.384 193.952-47.04l238.688-238.72c-21.28-67.712-3.648-143.264 47.04-193.952 36.128-36.16 84.256-56.064 135.456-56.064 27.264 0 54.816 5.92 79.648 17.12 9.568 4.32 16.448 13.056 18.304 23.392 1.92 10.336-1.408 20.96-8.832 28.384l-88.8 88.8 33.024 33.056 89.376-89.344c7.392-7.392 17.92-10.72 28.128-8.896 10.272 1.792 19.04 8.48 23.456 17.888 34.496 73.376 19.424 160.96-37.536 217.92-36.096 36.096-84.128 56-135.296 56-20.704 0-41.536-3.392-61.216-9.952l-237.12 237.12c22.688 68.48 5.44 145.024-46.048 196.544C388.736 940.16 340.672 960.032 289.536 960.032zM282.592 895.84c36.352 2.112 71.36-11.392 96.992-37.024 37.952-37.952 47.936-96.384 24.864-145.408-5.76-12.224-3.232-26.72 6.336-36.256l266.816-266.848c9.536-9.536 24.032-12.032 36.256-6.336 47.936 22.56 108 12.544 145.408-24.864 25.952-25.92 38.784-61.408 36.992-96.96l-72.576 72.544c-6.016 6.016-14.112 9.376-22.624 9.376l0 0c-8.512 0-16.64-3.36-22.624-9.376L700.16 276.416c-12.512-12.512-12.512-32.736 0-45.248l71.04-71.04c-35.072-0.896-68.8 12.384-93.696 37.28-37.92 37.92-48.064 94.272-25.856 143.552 5.44 12.128 2.848 26.368-6.56 35.776l-267.936 267.968c-9.376 9.376-23.648 11.936-35.776 6.56-47.68-21.504-106.624-11.104-143.584 25.856-25.504 25.536-38.464 59.392-37.408 93.856l69.92-69.92c12.512-12.512 32.736-12.512 45.248 0l78.304 78.272c6.016 6.016 9.376 14.112 9.376 22.624 0 8.48-3.36 16.64-9.376 22.624L282.592 895.84z" fill="#5C636E" p-id="4299"></path></svg>
|
||||||
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711724022815" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7442" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 85.333333c235.648 0 426.666667 191.061333 426.666667 426.666667s-191.018667 426.666667-426.666667 426.666667S85.333333 747.605333 85.333333 512 276.352 85.333333 512 85.333333z m0 71.125334c-196.053333 0-355.541333 159.488-355.541333 355.541333 0 196.053333 159.488 355.541333 355.541333 355.541333 196.053333 0 355.541333-159.488 355.541333-355.541333 0-196.053333-159.488-355.541333-355.541333-355.541333zM480 256a32 32 0 0 1 31.701333 27.648L512 288V512h138.666667a32 32 0 0 1 4.352 63.701333l-4.352 0.298667h-170.666667a32 32 0 0 1-31.701333-27.648l-0.298667-4.352v-256a32 32 0 0 1 32-32z" fill="#bfbfbf" p-id="7443"></path></svg>
|
||||||
|
After Width: | Height: | Size: 972 B |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711724082044" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8459" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M572.341333 512l268.490667-268.501333a42.666667 42.666667 0 0 0-59.274667-61.376c-0.362667 0.341333-0.704 0.693333-1.056 1.045333L512 451.658667 243.509333 183.168a42.666667 42.666667 0 0 0-60.341333 60.330667L451.669333 512 183.168 780.501333a42.666667 42.666667 0 0 0 59.669333 61.002667l0.672-0.672L512 572.341333l268.501333 268.490667C788.832 849.162667 799.754667 853.333333 810.666667 853.333333s21.845333-4.170667 30.165333-12.501333a42.666667 42.666667 0 0 0 0-60.330667L572.341333 512z" p-id="8460" fill="#d81e06"></path></svg>
|
||||||
|
After Width: | Height: | Size: 869 B |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711724278042" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11057" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M756.821333 256C691.541333 203.264 601.472 170.666667 512 170.666667a341.333333 341.333333 0 1 0 341.333333 341.333333 42.666667 42.666667 0 0 1 85.333334 0c0 235.648-191.018667 426.666667-426.666667 426.666667S85.333333 747.648 85.333333 512 276.352 85.333333 512 85.333333c108.757333 0 217.898667 39.082667 298.666667 104.490667V128a42.666667 42.666667 0 0 1 85.333333 0v170.666667a42.666667 42.666667 0 0 1-42.666667 42.666666h-170.666666a42.666667 42.666667 0 0 1 0-85.333333h74.154666z" p-id="11058" fill="#f0d323"></path></svg>
|
||||||
|
After Width: | Height: | Size: 867 B |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711724571236" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15667" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M223.579432 955.45963a24.234651 24.234651 0 0 1-3.071998-1.979732 508.995927 508.995927 0 0 1-184.319877-185.616943 34.133311 34.133311 0 0 1 12.561058-46.557836 33.655444 33.655444 0 0 1 46.694369 12.561058 440.25144 440.25144 0 0 0 159.880427 160.767893 15.223457 15.223457 0 0 1 2.525865 1.365333c12.424525 6.826662 24.917317 13.653324 37.751441 19.455987A443.733038 443.733038 0 0 0 701.582313 127.726848l-4.64213-2.662398-4.369064-2.389332H692.16152a444.347437 444.347437 0 0 0-423.867451 0l-1.365333 0.682666-3.618131 1.979732-5.188263 2.935465A440.114907 440.114907 0 0 0 95.852584 290.406206a33.723711 33.723711 0 0 1-46.694369 12.561059 34.133311 34.133311 0 0 1-12.561058-46.694369A512.477525 512.477525 0 0 1 695.233517 47.854901a0.682666 0.682666 0 0 0 0.546133 0c1.365332 0.682666 2.525865 1.365332 3.891198 1.843199a511.658326 511.658326 0 0 1-1.365333 925.35405l-1.228799 0.682666-3.618131 1.570132a505.71913 505.71913 0 0 1-176.947082 45.329037 492.065805 492.065805 0 0 1-37.614908 1.433599 507.835395 507.835395 0 0 1-255.317163-68.607954z" fill="#bfbfbf" p-id="15668"></path><path d="M539.176022 288.358208a231.492112 231.492112 0 0 1 163.498557 283.169944 34.133311 34.133311 0 0 1-41.847439 24.098118 34.133311 34.133311 0 0 1-24.098117-41.779173A162.952425 162.952425 0 1 0 437.117423 669.012887a34.133311 34.133311 0 0 1 24.098117 41.847439 34.133311 34.133311 0 0 1-41.779172 24.098117 231.219046 231.219046 0 1 1 119.739654-446.600235z" fill="#bfbfbf" p-id="15669"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711723813811" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4236" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M800 288a47.84 47.84 0 0 0-33.936 14.064L432 636.112 257.936 462.064a48 48 0 1 0-67.872 67.872l208 208c8.688 8.688 20.688 14.064 33.936 14.064s25.248-5.376 33.936-14.064l368-368A48 48 0 0 0 800 288z" fill="#bfbfbf" p-id="4237"></path></svg>
|
||||||
|
After Width: | Height: | Size: 573 B |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711724195931" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9893" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M800 288a47.84 47.84 0 0 0-33.936 14.064L432 636.112 257.936 462.064a48 48 0 1 0-67.872 67.872l208 208c8.688 8.688 20.688 14.064 33.936 14.064s25.248-5.376 33.936-14.064l368-368A48 48 0 0 0 800 288z" fill="#14ca20" p-id="9894"></path></svg>
|
||||||
|
After Width: | Height: | Size: 573 B |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711521868832" class="icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1603" xmlns:xlink="http://www.w3.org/1999/xlink" width="200.1953125" height="200"><path d="M982.668821 313.74918c-25.810101-60.752236-62.714-115.373446-109.685763-162.346233-46.972787-46.971763-101.593997-83.875662-162.346233-109.685763C647.666853 14.966132 580.925912 1.401699 512.268258 1.401699S376.868639 14.966132 313.898667 41.717184c-60.752236 25.810101-115.373446 62.714-162.346233 109.685763-46.971763 46.972787-83.875662 101.593997-109.685763 162.346233C15.115619 376.719151 1.551186 443.460092 1.551186 512.118771S15.115619 647.517366 41.866671 710.487337c25.810101 60.75326 62.714 115.37447 109.685763 162.346233 46.971763 46.972787 101.592974 83.876686 162.346233 109.685763 62.969971 26.752076 129.710912 40.316509 198.369591 40.316509s135.398595-13.564433 198.368567-40.316509c60.75326-25.809077 115.37447-62.712976 162.346233-109.685763 46.972787-46.971763 83.876686-101.592974 109.685763-162.346233 26.752076-62.969971 40.316509-129.710912 40.316509-198.368567S1009.419873 376.719151 982.668821 313.74918zM937.435615 691.271058c-23.333323 54.923257-56.71096 104.317532-99.204249 146.811845-42.494313 42.493289-91.888588 75.870926-146.811845 99.204249-56.8584 24.155503-117.133505 36.403219-179.152287 36.403219-62.018782 0-122.293887-12.247716-179.152287-36.403219-54.923257-23.333323-104.317532-56.71096-146.810821-99.204249-42.493289-42.494313-75.870926-91.888588-99.204249-146.811845C62.944374 634.412658 50.697682 574.136529 50.697682 512.118771c0-62.018782 12.247716-122.293887 36.403219-179.152287 23.333323-54.923257 56.709936-104.317532 99.204249-146.810821s91.888588-75.870926 146.810821-99.204249c56.8584-24.155503 117.133505-36.403219 179.152287-36.403219 62.017758 0 122.292863 12.247716 179.152287 36.403219 54.923257 23.333323 104.317532 56.709936 146.810821 99.204249 42.494313 42.493289 75.870926 91.888588 99.205273 146.810821 24.155503 56.8584 36.403219 117.134529 36.403219 179.152287S961.591118 634.412658 937.435615 691.271058z" fill="#ffffff" p-id="1604"></path><path d="M704.62457 319.769626c-9.997216-9.996192-26.203273-9.996192-36.199466 0L512.382933 475.810773 356.341786 319.769626c-9.996192-9.996192-26.204297-9.996192-36.199466 0-9.996192 9.996192-9.996192 26.203273 0 36.199466l156.041147 156.041147L320.14232 668.05241c-9.996192 9.997216-9.996192 26.204297 0 36.199466 4.997584 4.998608 11.549426 7.496888 18.100245 7.496888s13.101637-2.49828 18.100245-7.496888l156.041147-156.041147L668.424081 704.251876c4.998608 4.998608 11.548403 7.496888 18.100245 7.496888s13.101637-2.49828 18.100245-7.496888c9.996192-9.996192 9.996192-26.203273 0-36.199466L548.583423 512.011263l156.041147-156.041147C714.620762 345.973923 714.620762 329.765818 704.62457 319.769626z" fill="#ffffff" p-id="1605"></path></svg>
|
||||||
|
After Width: | Height: | Size: 2.9 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1709817911051" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4420" width="24" height="24" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M523.52 965.12a448 448 0 1 1 448-448 448 448 0 0 1-448 448z m0-832a384 384 0 1 0 384 384 384 384 0 0 0-384-384z" p-id="4421" fill="#c89bc7"></path><path d="M523.52 772.16a32 32 0 0 1-32-32V448a32 32 0 0 1 64 0v292.8a32 32 0 0 1-32 31.36z" p-id="4422" fill="#c89bc7"></path><path d="M523.52 293.12m-48 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0Z" p-id="4423" fill="#c89bc7"></path></svg>
|
||||||
|
After Width: | Height: | Size: 710 B |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1710991023487" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12657" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24"><path d="M512 42.666667q95.658667 0 182.485333 37.162667t149.674667 100.010667 100.010667 149.674667 37.162667 182.485333-37.162667 182.485333-100.010667 149.674667-149.674667 100.010667-182.485333 37.162667-182.485333-37.162667-149.674667-100.010667-100.010667-149.674667-37.162667-182.485333 37.162667-182.485333 100.010667-149.674667 149.674667-100.010667 182.485333-37.162667zM512 128q-77.994667 0-149.162667 30.506667t-122.496 81.834667-81.834667 122.496-30.506667 149.162667 30.506667 149.162667 81.834667 122.496 122.496 81.834667 149.162667 30.506667 149.162667-30.506667 122.496-81.834667 81.834667-122.496 30.506667-149.162667-30.506667-149.162667-81.834667-122.496-122.496-81.834667-149.162667-30.506667zM512 213.333333q17.664 0 30.165333 12.501333t12.501333 30.165333l0 238.336 115.669333 115.328q12.330667 12.330667 12.330667 30.336t-12.330667 30.336-30.336 12.330667-30.336-12.330667l-128-128q-12.330667-12.330667-12.330667-30.336l0-256q0-17.664 12.501333-30.165333t30.165333-12.501333z" fill="#E69966" p-id="12658"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1710991348108" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="26534" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24"><path d="M512 512m-48 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0Z" p-id="26535" fill="#9ACD32"></path><path d="M712 512m-48 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0Z" p-id="26536" fill="#9ACD32"></path><path d="M312 512m-48 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0Z" p-id="26537" fill="#9ACD32"></path><path d="M925.2 338.4c-22.6-53.7-55-101.9-96.3-143.3-41.3-41.3-89.5-73.8-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6 0.3-119.3 12.3-174.5 35.9-53.3 22.8-101.1 55.2-142 96.5-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9 0.3 69.4 16.9 138.3 48 199.9v152c0 25.4 20.6 46 46 46h152.1c61.6 31.1 130.5 47.7 199.9 48h2.1c59.9 0 118-11.6 172.7-34.3 53.5-22.3 101.6-54.3 142.8-95.2 41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5 0.3-60.9-11.5-120-34.8-175.6z m-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-0.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-0.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-0.6 99.6-39.7 192.9-110.1 262.7z" p-id="26538" fill="#9ACD32"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1710990953433" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11565" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24"><path d="M510 64.4c-246.5 0-447.6 200-447.6 447.6 0 246.5 200 447.6 447.6 447.6 246.5 0 447.6-200 447.6-447.6 0-246.5-200.1-447.6-447.6-447.6z m0 831.9c-212.3 0-384.3-172-384.3-384.3s172-384.3 384.3-384.3 384.3 172 384.3 384.3-172 384.3-384.3 384.3z m229.1-181.2c-18.4-70.4-67.9-125.5-131.2-153.6 48-30.6 79.6-84.2 79.6-144.9 0-94.9-77.1-172-172-172s-172 77.1-172 172c0 61.2 31.6 114.8 79.6 144.9-63.8 27.6-113.3 83.2-131.7 153.6-4.1 16.3 5.6 33.2 21.9 37.3 2.6 0.5 5.1 1 7.7 1 13.8 0 26-9.2 29.6-23 19.4-75 87.3-127.1 164.3-127.1S660 655.4 679.4 730.4c4.1 16.3 20.9 26 37.3 21.9 16.8-4 27-20.9 22.4-37.2zM515.6 305.8c61.2 0 110.7 49.5 110.7 110.7s-49.5 110.7-110.7 110.7-110.7-49.5-110.7-110.7 49.5-110.7 110.7-110.7z" p-id="11566" fill="#78A4FA"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,11 @@
|
|||||||
|
export type FixStatus = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
||||||
|
|
||||||
|
export const defaultAvatar =
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png';
|
||||||
|
|
||||||
|
export const tmplIds = ['hbblqs928F2kd1s0IR_pDIAjYrNscUmz6tv6NZKsctM'];
|
||||||
|
|
||||||
|
export type Info = {
|
||||||
|
phone: string;
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
component: true,
|
||||||
|
};
|
||||||
@@ -0,0 +1,190 @@
|
|||||||
|
import { View } from '@tarojs/components';
|
||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import {
|
||||||
|
ShowElements,
|
||||||
|
TicketInfo,
|
||||||
|
TicketNote,
|
||||||
|
} from '@/pages/TicketDetail/TicketNote';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import { RequestState } from '@/service';
|
||||||
|
import { getTicketInfo } from '@/service/ticketsInfo';
|
||||||
|
import { AtActivityIndicator, AtCard, AtSteps, AtToast } from 'taro-ui';
|
||||||
|
import NoteList from '../NoteList/NoteList';
|
||||||
|
|
||||||
|
interface StepItemData {
|
||||||
|
title: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DetailFrameworkState {
|
||||||
|
current: number;
|
||||||
|
items: Array<StepItemData>;
|
||||||
|
ticketInfo: TicketInfo;
|
||||||
|
notes: Array<TicketNote>;
|
||||||
|
rs: RequestState;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DetailFrameworkProps {
|
||||||
|
middleButton: JSX.Element;
|
||||||
|
id: number;
|
||||||
|
isInfoShow: { [key: string]: boolean };
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class DetailFramework extends Component<
|
||||||
|
DetailFrameworkProps,
|
||||||
|
DetailFrameworkState
|
||||||
|
> {
|
||||||
|
state = {
|
||||||
|
current: 0,
|
||||||
|
items: [],
|
||||||
|
ticketInfo: new TicketInfo(),
|
||||||
|
notes: [new TicketNote()],
|
||||||
|
rs: new RequestState(),
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
const navBar = pt.get().navBar;
|
||||||
|
Taro.setNavigationBarTitle({
|
||||||
|
title: navBar.ticketDetail,
|
||||||
|
});
|
||||||
|
getTicketInfo(this, this.props.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
props: Readonly<DetailFrameworkProps> = {
|
||||||
|
middleButton: <View></View>,
|
||||||
|
id: 0,
|
||||||
|
isInfoShow: {
|
||||||
|
device: true,
|
||||||
|
createdTime: true,
|
||||||
|
description: true,
|
||||||
|
current: true,
|
||||||
|
notelist: true,
|
||||||
|
showAllNotes: true,
|
||||||
|
info: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
render(): ReactNode {
|
||||||
|
if (this.state.rs.loading) {
|
||||||
|
return (
|
||||||
|
<AtActivityIndicator
|
||||||
|
mode='center'
|
||||||
|
content={pt.get().actIndicator.loading}
|
||||||
|
></AtActivityIndicator>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!this.state.rs.success) {
|
||||||
|
return (
|
||||||
|
<AtToast
|
||||||
|
isOpened
|
||||||
|
text={pt.get().toast.error}
|
||||||
|
icon='close-circle'
|
||||||
|
></AtToast>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const elements: ShowElements = {
|
||||||
|
device: this.props.isInfoShow['device'] ? (
|
||||||
|
<View className='at-article__h1'>
|
||||||
|
{this.state.ticketInfo.device +
|
||||||
|
' ' +
|
||||||
|
this.state.ticketInfo.deviceModel}
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
|
<View></View>
|
||||||
|
),
|
||||||
|
createdTime: this.props.isInfoShow['createdTime'] ? (
|
||||||
|
<View className='at-article__info'>
|
||||||
|
{pt.get().common.createdAtText(this.state.ticketInfo.createdTime)}
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
|
<View></View>
|
||||||
|
),
|
||||||
|
description: this.props.isInfoShow['description'] ? (
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
paddingTop: '20rpx',
|
||||||
|
paddingBottom: '20rpx',
|
||||||
|
width: '94%',
|
||||||
|
marginLeft: '3%',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<AtCard isFull title={pt.get().ticketDetail.desc.title}>
|
||||||
|
<View className='at-article__h3'>
|
||||||
|
{this.state.ticketInfo.description}
|
||||||
|
</View>
|
||||||
|
</AtCard>
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
|
<View></View>
|
||||||
|
),
|
||||||
|
info: this.props.isInfoShow['info'] ? (
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
paddingTop: '20rpx',
|
||||||
|
paddingBottom: '20rpx',
|
||||||
|
width: '94%',
|
||||||
|
marginLeft: '3%',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<AtCard
|
||||||
|
isFull
|
||||||
|
title={pt.get().ticketDetail.info.title}
|
||||||
|
extra={pt.get().ticketDetail.info.extra}
|
||||||
|
extraStyle={{ fontSize: '32rpx', marginRight: '40rpx' }}
|
||||||
|
>
|
||||||
|
<View style={{ display: 'flex' }}>
|
||||||
|
<View className='at-article__h3'>
|
||||||
|
{this.state.ticketInfo.info.name}
|
||||||
|
</View>
|
||||||
|
<View style={{ marginLeft: 'auto' }} className='at-article__h3'>
|
||||||
|
{this.state.ticketInfo.info.phone}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</AtCard>
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
|
<View></View>
|
||||||
|
),
|
||||||
|
current: this.props.isInfoShow['current'] ? (
|
||||||
|
<View style={{ padding: '20rpx' }}>
|
||||||
|
<AtSteps
|
||||||
|
items={this.state.items}
|
||||||
|
current={this.state.current}
|
||||||
|
onChange={() => {}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
|
<View></View>
|
||||||
|
),
|
||||||
|
notelist: this.props.isInfoShow['notelist'] ? (
|
||||||
|
this.props.isInfoShow['showAllNotes'] ? (
|
||||||
|
<View style={{ padding: '20rpx' }}>
|
||||||
|
<NoteList noteList={this.state.notes} showPic />
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
|
<View style={{ padding: '20rpx' }}>
|
||||||
|
<NoteList
|
||||||
|
noteList={[this.state.notes[this.state.notes.length - 1]]}
|
||||||
|
showPic={false}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
) : (
|
||||||
|
<View></View>
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View>
|
||||||
|
{elements.device}
|
||||||
|
{elements.createdTime}
|
||||||
|
{elements.description}
|
||||||
|
{elements.info}
|
||||||
|
{elements.current}
|
||||||
|
{this.props.middleButton}
|
||||||
|
{elements.notelist}
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
component: true,
|
||||||
|
};
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import { View } from '@tarojs/components';
|
||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import { AtAccordion } from 'taro-ui';
|
||||||
|
|
||||||
|
export class ExpandItem extends Component {
|
||||||
|
state = {
|
||||||
|
open: false,
|
||||||
|
};
|
||||||
|
props = {
|
||||||
|
title: '',
|
||||||
|
content: <View></View>,
|
||||||
|
};
|
||||||
|
|
||||||
|
handleClick(value: boolean) {
|
||||||
|
this.setState({ open: value });
|
||||||
|
}
|
||||||
|
|
||||||
|
render(): ReactNode {
|
||||||
|
return (
|
||||||
|
<View>
|
||||||
|
<AtAccordion
|
||||||
|
open={this.state.open}
|
||||||
|
onClick={this.handleClick.bind(this)}
|
||||||
|
title={this.props.title}
|
||||||
|
>
|
||||||
|
{this.props.content}
|
||||||
|
</AtAccordion>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
component: true,
|
||||||
|
};
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
import { Image, View } from '@tarojs/components';
|
||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import { TicketNote, StatusStr } from '@/pages/TicketDetail/TicketNote';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import { timeFormat } from '@/utils';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import './NoteCard.scss';
|
||||||
|
|
||||||
|
interface NoteCardProps {
|
||||||
|
note: TicketNote;
|
||||||
|
showPic: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class NoteCard extends Component<NoteCardProps, {}> {
|
||||||
|
props: Readonly<NoteCardProps> = {
|
||||||
|
note: new TicketNote(),
|
||||||
|
showPic: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
render(): ReactNode {
|
||||||
|
let message = '';
|
||||||
|
let pic: string[] = [];
|
||||||
|
const note = this.props.note;
|
||||||
|
const td = pt.get().ticketDetail;
|
||||||
|
const createMessage = td.comment.createTicketMessage;
|
||||||
|
const modifyMessage = td.statusModifyMessage;
|
||||||
|
const prefix = td.comment.statusModifyPrefix;
|
||||||
|
|
||||||
|
switch (note.type) {
|
||||||
|
case 0:
|
||||||
|
message = createMessage;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
message = pt.get().ticketDetail.comment.picked;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
message = prefix + modifyMessage.get(note.content as StatusStr) || '';
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
message = note.content;
|
||||||
|
pic = note.pic;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
const showPicDetail = (url: string) => {
|
||||||
|
Taro.previewImage({
|
||||||
|
current: url,
|
||||||
|
urls: [url],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const notePicRenderer = (
|
||||||
|
<View>
|
||||||
|
<View className='at-row' style={{ marginLeft: '30rpx' }}>
|
||||||
|
{pic.map((url, idx) => (
|
||||||
|
<View className='at-col at-col-4' key={idx}>
|
||||||
|
<Image
|
||||||
|
style='width: 160rpx; height: 160rpx;'
|
||||||
|
src={url}
|
||||||
|
mode='aspectFit'
|
||||||
|
onClick={showPicDetail.bind(this, url)}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View className='at-row at-row__align--start'>
|
||||||
|
<View
|
||||||
|
className='at-col at-col-1 at-col--auto'
|
||||||
|
style={{ marginTop: '80rpx' }}
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
style='width: 70rpx; height: 70rpx; border-radius: 35px;'
|
||||||
|
src={note.avatar}
|
||||||
|
mode='aspectFit'
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
className='at-col at-col--wrap'
|
||||||
|
style={{
|
||||||
|
marginTop: '40rpx',
|
||||||
|
marginBottom: '40rpx',
|
||||||
|
wordBreak: 'normal',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<View className='at-article__p'>{note.op}</View>
|
||||||
|
<View className='at-article__info'>
|
||||||
|
{note.createdTime.format(timeFormat)}
|
||||||
|
</View>
|
||||||
|
<View className='at-article__h3' style={{ marginBottom: '20rpx' }}>
|
||||||
|
{message}
|
||||||
|
</View>
|
||||||
|
{this.props.showPic ? notePicRenderer : null}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
component: true,
|
||||||
|
};
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import NoteCard from '@/components/NoteCard/NoteCard';
|
||||||
|
import { TicketNote } from '@/pages/TicketDetail/TicketNote';
|
||||||
|
import { View } from '@tarojs/components';
|
||||||
|
import { AtDivider } from 'taro-ui';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
|
||||||
|
interface NoteListProps {
|
||||||
|
noteList: Array<TicketNote>;
|
||||||
|
showPic: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class NoteList extends Component<NoteListProps, {}> {
|
||||||
|
props: Readonly<NoteListProps> = {
|
||||||
|
noteList: [],
|
||||||
|
showPic: true,
|
||||||
|
};
|
||||||
|
render(): ReactNode {
|
||||||
|
return (
|
||||||
|
<View>
|
||||||
|
<AtDivider
|
||||||
|
fontColor='#CCC'
|
||||||
|
content={pt.get().ticketDetail.divider}
|
||||||
|
height={20}
|
||||||
|
/>
|
||||||
|
{this.props.noteList.map((note, idx) => (
|
||||||
|
<View key={idx}>
|
||||||
|
<NoteCard note={note} showPic={this.props.showPic} />
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 = '30rpx';
|
||||||
|
const blankHeightLower = '220rpx';
|
||||||
return (
|
return (
|
||||||
|
<View>
|
||||||
|
<View style={{ height: blankHeightUpper }}></View>
|
||||||
<View>
|
<View>
|
||||||
<AtDivider
|
<AtDivider
|
||||||
content={pt.get().pageFooter.dividerText}
|
content={pt.get().pageFooter.dividerText}
|
||||||
fontColor='#dddddd'
|
fontColor='#dddddd'
|
||||||
lineColor='#dddddd'
|
lineColor='#dddddd'
|
||||||
/>
|
/>
|
||||||
<View style={{ height: blankHeight }}></View>
|
</View>
|
||||||
|
<View className='at-row at-row__justify--center'>
|
||||||
|
<Text style='color:#dddddd; fontSize:32rpx'>© 2024 EVA Tech</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{ height: blankHeightLower }}></View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
component: true,
|
||||||
|
};
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
import { picUpload } from '@/service/picUpload';
|
||||||
|
import { View } from '@tarojs/components';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import { AtImagePicker } from 'taro-ui';
|
||||||
|
import { File } from 'taro-ui/types/image-picker';
|
||||||
|
|
||||||
|
const reLaunchInterval = 1000;
|
||||||
|
|
||||||
|
interface PicUploaderState {
|
||||||
|
files: File[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PicUploaderProps {
|
||||||
|
source: string;
|
||||||
|
id: number;
|
||||||
|
superId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class PicUploader extends Component<
|
||||||
|
PicUploaderProps,
|
||||||
|
PicUploaderState
|
||||||
|
> {
|
||||||
|
state = {
|
||||||
|
files: [] as File[],
|
||||||
|
};
|
||||||
|
onUpload() {
|
||||||
|
if (this.state.files.length !== 0) {
|
||||||
|
for (let file of this.state.files) {
|
||||||
|
picUpload(this, file.url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.props.source == 'comment') {
|
||||||
|
setTimeout(() => {
|
||||||
|
Taro.reLaunch({
|
||||||
|
url: '/pages/TicketDetail/TicketDetail?id=' + this.props.superId,
|
||||||
|
});
|
||||||
|
}, reLaunchInterval);
|
||||||
|
} else if (this.props.source == 'conclusion') {
|
||||||
|
setTimeout(() => {
|
||||||
|
Taro.reLaunch({
|
||||||
|
url: '/pages/index/index',
|
||||||
|
});
|
||||||
|
}, reLaunchInterval);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
handlePicChange(files: File[]) {
|
||||||
|
this.setState({
|
||||||
|
files: files,
|
||||||
|
});
|
||||||
|
return files;
|
||||||
|
}
|
||||||
|
render(): ReactNode {
|
||||||
|
return (
|
||||||
|
<View>
|
||||||
|
<AtImagePicker
|
||||||
|
showAddBtn={this.state.files.length !== 3}
|
||||||
|
count={3}
|
||||||
|
files={this.state.files}
|
||||||
|
sizeType={['compressed']}
|
||||||
|
onChange={this.handlePicChange.bind(this)}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
component: true,
|
||||||
|
};
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
import { AtListItem } from 'taro-ui';
|
||||||
|
import create from '@/assets/icons/TicketState/create.svg';
|
||||||
|
import repair from '@/assets/icons/TicketState/repair.svg';
|
||||||
|
import success from '@/assets/icons/TicketState/success.svg';
|
||||||
|
import fail from '@/assets/icons/TicketState/fail.svg';
|
||||||
|
import refuse from '@/assets/icons/TicketState/refuse.svg';
|
||||||
|
import retrieve from '@/assets/icons/TicketState/retrieve.svg';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import { FixStatus } from '@/common';
|
||||||
|
|
||||||
|
export class TicketListItem {
|
||||||
|
id: number;
|
||||||
|
brand: string;
|
||||||
|
model: string;
|
||||||
|
status: FixStatus;
|
||||||
|
createAt: moment.Moment;
|
||||||
|
iconMap: Map<FixStatus, string>;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
id: number,
|
||||||
|
brand: string,
|
||||||
|
model: string,
|
||||||
|
status: FixStatus,
|
||||||
|
createAt: moment.Moment,
|
||||||
|
) {
|
||||||
|
this.id = id;
|
||||||
|
this.brand = brand;
|
||||||
|
this.model = model;
|
||||||
|
this.status = status;
|
||||||
|
this.createAt = createAt;
|
||||||
|
this.iconMap = new Map<FixStatus, string>([
|
||||||
|
[0, create],
|
||||||
|
[1, repair],
|
||||||
|
[2, refuse],
|
||||||
|
[3, retrieve],
|
||||||
|
[4, success],
|
||||||
|
[5, retrieve],
|
||||||
|
[6, fail],
|
||||||
|
[7, retrieve],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
render(): JSX.Element {
|
||||||
|
const tl = pt.get().ticketList;
|
||||||
|
return (
|
||||||
|
<AtListItem
|
||||||
|
title={this.brand + ' ' + this.model}
|
||||||
|
note={tl.createdAt(this.createAt.format('YYYY-MM-DD HH:mm'))}
|
||||||
|
extraText={tl.statusMap.get(this.status)}
|
||||||
|
arrow='right'
|
||||||
|
thumb={this.iconMap.get(this.status)}
|
||||||
|
onClick={() => {
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: '/pages/TicketDetail/TicketDetail?id=' + this.id,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,45 +1,67 @@
|
|||||||
import { Component, ReactNode } from 'react';
|
import { Component, ReactNode } from 'react';
|
||||||
import { AtTabBar } from 'taro-ui';
|
import { AtTabBar } from 'taro-ui';
|
||||||
import Taro from '@tarojs/taro';
|
import Taro from '@tarojs/taro';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import wechatUser from '@/wechat';
|
||||||
import 'taro-ui/dist/style/index.scss';
|
import 'taro-ui/dist/style/index.scss';
|
||||||
import './index.scss';
|
import './index.scss';
|
||||||
|
|
||||||
const navList: Array<Taro.TabBarItem> = [
|
const navList: () => Array<Taro.TabBarItem> = () => {
|
||||||
|
return [
|
||||||
{
|
{
|
||||||
pagePath: '/pages/index/index',
|
pagePath: '/pages/index/index',
|
||||||
text: '主页',
|
text: pt.get().tabBar.indexText,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pagePath: '/pages/repair/repair',
|
pagePath: '/pages/repair/repair',
|
||||||
text: '维修',
|
text: pt.get().tabBar.repairText,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pagePath: '/pages/user/user',
|
pagePath: '/pages/user/user',
|
||||||
text: '我的',
|
text: pt.get().tabBar.userText,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
const tabList = () => {
|
||||||
|
return wechatUser.getAccess()
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
title: pt.get().tabBar.memberText,
|
||||||
|
iconType: 'sketch',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: pt.get().tabBar.repairText,
|
||||||
|
iconType: 'settings',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: pt.get().tabBar.userText,
|
||||||
|
iconType: 'user',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: [
|
||||||
|
{
|
||||||
|
title: pt.get().tabBar.indexText,
|
||||||
|
iconType: 'home',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: pt.get().tabBar.repairText,
|
||||||
|
iconType: 'settings',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: pt.get().tabBar.userText,
|
||||||
|
iconType: 'user',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
export default class Index extends Component {
|
export default class Index extends Component {
|
||||||
state = {
|
state = {
|
||||||
selected: 0,
|
selected: 0,
|
||||||
tabList: [
|
|
||||||
{
|
|
||||||
title: '主页',
|
|
||||||
iconType: 'home',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '维修',
|
|
||||||
iconType: 'settings',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '我的',
|
|
||||||
iconType: 'user',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
handleClick(idx: number) {
|
handleClick(idx: number) {
|
||||||
this.switchTab(idx, navList[idx].pagePath);
|
this.switchTab(idx, navList()[idx].pagePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
switchTab(idx: number, url: string) {
|
switchTab(idx: number, url: string) {
|
||||||
@@ -57,7 +79,7 @@ export default class Index extends Component {
|
|||||||
return (
|
return (
|
||||||
<AtTabBar
|
<AtTabBar
|
||||||
fixed
|
fixed
|
||||||
tabList={this.state.tabList}
|
tabList={tabList()}
|
||||||
onClick={this.handleClick.bind(this)}
|
onClick={this.handleClick.bind(this)}
|
||||||
current={this.state.selected}
|
current={this.state.selected}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
export default definePageConfig({
|
export default definePageConfig({
|
||||||
navigationBarTitleText: '设置',
|
|
||||||
usingComponents: {},
|
usingComponents: {},
|
||||||
});
|
});
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import { View } from '@tarojs/components';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import PageFooter from '@/components/PageFooter/PageFooter';
|
||||||
|
import './404.scss';
|
||||||
|
|
||||||
|
export default class NotFoundPage extends Component {
|
||||||
|
componentDidMount(): void {
|
||||||
|
Taro.setNavigationBarTitle({
|
||||||
|
title: pt.get().navBar.notFound,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
render(): ReactNode {
|
||||||
|
return (
|
||||||
|
<View>
|
||||||
|
<View
|
||||||
|
className='page-title'
|
||||||
|
style={{ marginTop: '150rpx', marginBottom: '240rpx' }}
|
||||||
|
>
|
||||||
|
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||||
|
{pt.get().notFound.title.ZhCn}
|
||||||
|
</View>
|
||||||
|
<View className='at-article__h2'>{pt.get().notFound.desc.ZhCn}</View>
|
||||||
|
<View style={{ height: '150rpx' }}></View>
|
||||||
|
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||||
|
{pt.get().notFound.title.EnUs}
|
||||||
|
</View>
|
||||||
|
<View className='at-article__h2'>{pt.get().notFound.desc.EnUs}</View>
|
||||||
|
</View>
|
||||||
|
<PageFooter />
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
usingComponents: {},
|
||||||
|
});
|
||||||
@@ -0,0 +1,187 @@
|
|||||||
|
import {
|
||||||
|
AtTextarea,
|
||||||
|
AtButton,
|
||||||
|
AtForm,
|
||||||
|
AtMessage,
|
||||||
|
AtInput,
|
||||||
|
AtList,
|
||||||
|
AtListItem,
|
||||||
|
AtModal,
|
||||||
|
} from 'taro-ui';
|
||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import { Picker, View } from '@tarojs/components';
|
||||||
|
import { askLeave } from '@/service/askleave';
|
||||||
|
import './AskLeave.scss';
|
||||||
|
|
||||||
|
const submitInterval = 5000;
|
||||||
|
|
||||||
|
export default class AskLeavePage extends Component {
|
||||||
|
state = {
|
||||||
|
isLoading: false,
|
||||||
|
isDisable: false,
|
||||||
|
showModal: false,
|
||||||
|
range: [pt.get().askLeave.shift.week, pt.get().askLeave.shift.shift],
|
||||||
|
shift: [0, 0],
|
||||||
|
reason: '',
|
||||||
|
substitute: '',
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
Taro.setNavigationBarTitle({
|
||||||
|
title: pt.get().navBar.askLeave,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onShiftSelect(event) {
|
||||||
|
this.setState({
|
||||||
|
shift: event.detail.value,
|
||||||
|
});
|
||||||
|
console.log(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
onModalClose() {
|
||||||
|
this.setState({
|
||||||
|
showModal: false,
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
onModalCancel() {
|
||||||
|
this.setState({
|
||||||
|
showModal: false,
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
onModalConfirm() {
|
||||||
|
this.setState({
|
||||||
|
showModal: false,
|
||||||
|
});
|
||||||
|
askLeave(this);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleReasonChange(reason: string) {
|
||||||
|
this.setState({
|
||||||
|
reason,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleSubstituteChange(substitute: string) {
|
||||||
|
this.setState({
|
||||||
|
substitute,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onSubmit() {
|
||||||
|
this.setState({
|
||||||
|
isDisable: true,
|
||||||
|
});
|
||||||
|
if (this.state.reason == '') {
|
||||||
|
Taro.atMessage({
|
||||||
|
message: pt.get().button.submitText.blank,
|
||||||
|
type: 'error',
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.state.substitute == '') {
|
||||||
|
this.setState({
|
||||||
|
showModal: true,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
askLeave(this);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
}
|
||||||
|
render(): ReactNode {
|
||||||
|
return (
|
||||||
|
<View style={{ marginTop: '30rpx', width: '94%', marginLeft: '3%' }}>
|
||||||
|
<AtMessage />
|
||||||
|
<AtModal
|
||||||
|
isOpened={this.state.showModal}
|
||||||
|
title={pt.get().askLeave.modal.title}
|
||||||
|
cancelText={pt.get().modal.cancel}
|
||||||
|
confirmText={pt.get().modal.confirm}
|
||||||
|
onClose={this.onModalClose.bind(this)}
|
||||||
|
onCancel={this.onModalCancel.bind(this)}
|
||||||
|
onConfirm={this.onModalConfirm.bind(this)}
|
||||||
|
content={pt.get().askLeave.modal.content}
|
||||||
|
/>
|
||||||
|
<AtForm onSubmit={this.onSubmit.bind(this)}>
|
||||||
|
<View style={{ width: '98%', marginLeft: '1%' }}>
|
||||||
|
<Picker
|
||||||
|
mode='multiSelector'
|
||||||
|
range={this.state.range}
|
||||||
|
onChange={this.onShiftSelect.bind(this)}
|
||||||
|
value={this.state.shift}
|
||||||
|
>
|
||||||
|
<AtList>
|
||||||
|
<AtListItem
|
||||||
|
title={pt.get().askLeave.shift.title}
|
||||||
|
extraText={
|
||||||
|
pt.get().askLeave.shift.week[this.state.shift[0]] +
|
||||||
|
pt.get().askLeave.shift.shift[this.state.shift[1]]
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</AtList>
|
||||||
|
</Picker>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
className='at-article__h3'
|
||||||
|
style={{ marginTop: '20rpx', marginBottom: '20rpx' }}
|
||||||
|
>
|
||||||
|
{pt.get().askLeave.reason.title}
|
||||||
|
</View>
|
||||||
|
<AtTextarea
|
||||||
|
value={this.state.reason}
|
||||||
|
onChange={this.handleReasonChange.bind(this)}
|
||||||
|
maxLength={200}
|
||||||
|
placeholder={pt.get().askLeave.reason.placeHolder}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<AtInput
|
||||||
|
name='substitute'
|
||||||
|
title={pt.get().askLeave.substitute.title}
|
||||||
|
type='text'
|
||||||
|
placeholder={pt.get().askLeave.substitute.placeHolder}
|
||||||
|
value={this.state.substitute}
|
||||||
|
onChange={this.handleSubstituteChange.bind(this)}
|
||||||
|
/>
|
||||||
|
<View>
|
||||||
|
<AtButton
|
||||||
|
loading={this.state.isLoading}
|
||||||
|
formType='submit'
|
||||||
|
type='primary'
|
||||||
|
disabled={this.state.isDisable}
|
||||||
|
>
|
||||||
|
{pt.get().button.buttonText.submit}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
</AtForm>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
usingComponents: {},
|
||||||
|
});
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
import {
|
||||||
|
AtTextarea,
|
||||||
|
AtButton,
|
||||||
|
AtForm,
|
||||||
|
AtMessage,
|
||||||
|
AtList,
|
||||||
|
AtListItem,
|
||||||
|
} from 'taro-ui';
|
||||||
|
import React, { Component, ReactNode } from 'react';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import { Picker, View } from '@tarojs/components';
|
||||||
|
import PicUploader from '@/components/PicUploader/PicUploader';
|
||||||
|
import { conclude } from '@/service/conclude';
|
||||||
|
import './Conclusion.scss';
|
||||||
|
|
||||||
|
const submitInterval = 5000;
|
||||||
|
|
||||||
|
export default class ConclusionPage extends Component {
|
||||||
|
state = {
|
||||||
|
isLoading: false,
|
||||||
|
isDisable: false,
|
||||||
|
conclusion: '',
|
||||||
|
conclusionId: 0,
|
||||||
|
range: [pt.get().askLeave.shift.week, pt.get().askLeave.shift.shift],
|
||||||
|
shift: [0, 0],
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
Taro.setNavigationBarTitle({
|
||||||
|
title: pt.get().navBar.conclusion,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
uploaderRef = React.createRef<PicUploader>();
|
||||||
|
|
||||||
|
handleConclusionChange(conclusion: string) {
|
||||||
|
this.setState({
|
||||||
|
conclusion,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onShiftSelect(event) {
|
||||||
|
this.setState({
|
||||||
|
shift: event.detail.value,
|
||||||
|
});
|
||||||
|
console.log(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
onSubmit() {
|
||||||
|
this.setState({
|
||||||
|
isDisable: true,
|
||||||
|
});
|
||||||
|
if (this.state.conclusion == '') {
|
||||||
|
Taro.atMessage({
|
||||||
|
message: pt.get().button.submitText.blank,
|
||||||
|
type: 'error',
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
conclude(this);
|
||||||
|
this.uploaderRef.current?.onUpload();
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
}
|
||||||
|
render(): ReactNode {
|
||||||
|
return (
|
||||||
|
<View style={{ marginTop: '30rpx', width: '94%', marginLeft: '3%' }}>
|
||||||
|
<AtMessage />
|
||||||
|
<AtForm onSubmit={this.onSubmit.bind(this)}>
|
||||||
|
<View style={{ width: '98%', marginLeft: '1%' }}>
|
||||||
|
<Picker
|
||||||
|
mode='multiSelector'
|
||||||
|
range={this.state.range}
|
||||||
|
onChange={this.onShiftSelect.bind(this)}
|
||||||
|
value={this.state.shift}
|
||||||
|
>
|
||||||
|
<AtList>
|
||||||
|
<AtListItem
|
||||||
|
title={pt.get().askLeave.shift.title}
|
||||||
|
extraText={
|
||||||
|
pt.get().askLeave.shift.week[this.state.shift[0]] +
|
||||||
|
pt.get().askLeave.shift.shift[this.state.shift[1]]
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</AtList>
|
||||||
|
</Picker>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
className='at-article__h3'
|
||||||
|
style={{ marginTop: '20rpx', marginBottom: '20rpx' }}
|
||||||
|
>
|
||||||
|
{pt.get().conclusion.title}
|
||||||
|
</View>
|
||||||
|
<AtTextarea
|
||||||
|
value={this.state.conclusion}
|
||||||
|
onChange={this.handleConclusionChange.bind(this)}
|
||||||
|
maxLength={200}
|
||||||
|
height={400}
|
||||||
|
placeholder={pt.get().conclusion.placeHolder}
|
||||||
|
/>
|
||||||
|
<PicUploader
|
||||||
|
ref={this.uploaderRef}
|
||||||
|
source='conclusion'
|
||||||
|
id={this.state.conclusionId}
|
||||||
|
/>
|
||||||
|
<View>
|
||||||
|
<AtButton
|
||||||
|
loading={this.state.isLoading}
|
||||||
|
formType='submit'
|
||||||
|
type='primary'
|
||||||
|
disabled={this.state.isDisable}
|
||||||
|
>
|
||||||
|
{pt.get().button.buttonText.submit}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
</AtForm>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
usingComponents: {},
|
||||||
|
});
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import { AtActivityIndicator } from 'taro-ui';
|
||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import { View } from '@tarojs/components';
|
||||||
|
import wechatUser from '@/wechat';
|
||||||
|
import './Loading.scss';
|
||||||
|
|
||||||
|
export default class LoadingPage extends Component {
|
||||||
|
componentDidMount(): void {
|
||||||
|
Taro.setNavigationBarTitle({
|
||||||
|
title: pt.get().navBar.loading,
|
||||||
|
});
|
||||||
|
if (wechatUser.getToken()) {
|
||||||
|
Taro.reLaunch({
|
||||||
|
url: '/pages/index/index',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
render(): ReactNode {
|
||||||
|
return (
|
||||||
|
<View>
|
||||||
|
<AtActivityIndicator
|
||||||
|
mode='center'
|
||||||
|
content={pt.get().actIndicator.loading}
|
||||||
|
></AtActivityIndicator>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
import { ExpandItem } from '@/components/ExpandItem/ExpandItem';
|
||||||
|
import PicUploader from '@/components/PicUploader/PicUploader';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import { submitComment } from '@/service/submitComment';
|
||||||
|
import { View } from '@tarojs/components';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import React, { Component, ReactNode } from 'react';
|
||||||
|
import { AtButton, AtForm, AtTextarea } from 'taro-ui';
|
||||||
|
|
||||||
|
const submitInterval = 5000;
|
||||||
|
|
||||||
|
export interface commentData {
|
||||||
|
content: string;
|
||||||
|
id: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Comment extends Component {
|
||||||
|
state = {
|
||||||
|
isLoading: false,
|
||||||
|
isDisable: false,
|
||||||
|
comment: '',
|
||||||
|
commentId: 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
uploaderRef = React.createRef<PicUploader>();
|
||||||
|
|
||||||
|
props = {
|
||||||
|
setFloatLayout: (_: boolean) => {},
|
||||||
|
id: 0,
|
||||||
|
didMount: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
handleCommentChange(comment: string) {
|
||||||
|
this.setState({
|
||||||
|
comment: comment,
|
||||||
|
});
|
||||||
|
return comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
onCommentSubmit() {
|
||||||
|
this.setState({
|
||||||
|
isDisable: true,
|
||||||
|
});
|
||||||
|
this.props.setFloatLayout(false);
|
||||||
|
if (this.state.comment == '') {
|
||||||
|
Taro.atMessage({
|
||||||
|
message: pt.get().button.submitText.blank,
|
||||||
|
type: 'error',
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
submitComment(this);
|
||||||
|
this.uploaderRef.current?.onUpload();
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
render(): ReactNode {
|
||||||
|
return this.props.didMount ? (
|
||||||
|
<AtForm onSubmit={this.onCommentSubmit.bind(this)}>
|
||||||
|
<AtTextarea
|
||||||
|
value={this.state.comment}
|
||||||
|
onChange={this.handleCommentChange.bind(this)}
|
||||||
|
maxLength={200}
|
||||||
|
height='400rpx'
|
||||||
|
placeholder={pt.get().ticketDetail.comment.placeholder}
|
||||||
|
/>
|
||||||
|
<ExpandItem
|
||||||
|
title={pt.get().ticketDetail.comment.uploadPic.title}
|
||||||
|
content={
|
||||||
|
<PicUploader
|
||||||
|
ref={this.uploaderRef}
|
||||||
|
source='comment'
|
||||||
|
superId={this.props.id}
|
||||||
|
id={this.state.commentId}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<AtButton
|
||||||
|
loading={this.state.isLoading}
|
||||||
|
disabled={this.state.isDisable}
|
||||||
|
formType='submit'
|
||||||
|
type='primary'
|
||||||
|
>
|
||||||
|
{pt.get().button.buttonText.submit}
|
||||||
|
</AtButton>
|
||||||
|
<View style={{ marginBottom: '20rpx' }}></View>
|
||||||
|
</AtForm>
|
||||||
|
) : (
|
||||||
|
<View></View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
usingComponents: {},
|
||||||
|
});
|
||||||
@@ -0,0 +1,699 @@
|
|||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import { View } from '@tarojs/components';
|
||||||
|
import { getCurrentInstance } from '@tarojs/runtime';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import {
|
||||||
|
AtActionSheet,
|
||||||
|
AtActionSheetItem,
|
||||||
|
AtButton,
|
||||||
|
AtCheckbox,
|
||||||
|
AtFloatLayout,
|
||||||
|
AtForm,
|
||||||
|
AtMessage,
|
||||||
|
AtModal,
|
||||||
|
} from 'taro-ui';
|
||||||
|
import DetailFramework from '@/components/DetailFramework/DetailFramework';
|
||||||
|
import PageFooter from '@/components/PageFooter/PageFooter';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import wechatUser from '@/wechat';
|
||||||
|
import { addToOreo } from '@/service/addToOreo';
|
||||||
|
import { pickTicket } from '@/service/pickTicket';
|
||||||
|
import { retrieve } from '@/service/retrieve';
|
||||||
|
import { changeStatus } from '@/service/changeStatus';
|
||||||
|
import { getDisable } from '@/service/getDisable';
|
||||||
|
import { StatusStr } from './TicketNote';
|
||||||
|
import { Comment } from './Comment';
|
||||||
|
|
||||||
|
const submitInterval = 5000;
|
||||||
|
|
||||||
|
interface TicketDetailState {
|
||||||
|
id: number;
|
||||||
|
isMember: boolean;
|
||||||
|
show: {
|
||||||
|
modal: {
|
||||||
|
oreo: boolean;
|
||||||
|
retrieve: boolean;
|
||||||
|
pick: boolean;
|
||||||
|
};
|
||||||
|
layout: {
|
||||||
|
comment: boolean;
|
||||||
|
reminder: boolean;
|
||||||
|
};
|
||||||
|
actionSheet: {
|
||||||
|
status: boolean;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
isLoading: {
|
||||||
|
oreo: boolean;
|
||||||
|
pick: boolean;
|
||||||
|
retrieve: boolean;
|
||||||
|
comment: boolean;
|
||||||
|
status: boolean;
|
||||||
|
reminder: boolean;
|
||||||
|
framework: boolean;
|
||||||
|
};
|
||||||
|
isDisable: {
|
||||||
|
oreo: boolean;
|
||||||
|
pick: boolean;
|
||||||
|
retrieve: boolean;
|
||||||
|
comment: boolean;
|
||||||
|
status: boolean;
|
||||||
|
reminder: boolean;
|
||||||
|
};
|
||||||
|
isDisable_main: {
|
||||||
|
oreo: boolean;
|
||||||
|
pick: boolean;
|
||||||
|
retrieve: boolean;
|
||||||
|
comment: boolean;
|
||||||
|
};
|
||||||
|
reminderList: Array<number>;
|
||||||
|
statusToBe: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
|
state: Readonly<TicketDetailState> = {
|
||||||
|
id: 0,
|
||||||
|
isMember: false,
|
||||||
|
show: {
|
||||||
|
modal: {
|
||||||
|
oreo: false,
|
||||||
|
retrieve: false,
|
||||||
|
pick: false,
|
||||||
|
},
|
||||||
|
layout: {
|
||||||
|
comment: false,
|
||||||
|
reminder: false,
|
||||||
|
},
|
||||||
|
actionSheet: {
|
||||||
|
status: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
isLoading: {
|
||||||
|
oreo: false,
|
||||||
|
pick: false,
|
||||||
|
retrieve: false,
|
||||||
|
comment: false,
|
||||||
|
status: false,
|
||||||
|
reminder: false,
|
||||||
|
framework: true,
|
||||||
|
},
|
||||||
|
isDisable: {
|
||||||
|
oreo: false,
|
||||||
|
pick: false,
|
||||||
|
retrieve: false,
|
||||||
|
comment: false,
|
||||||
|
status: false,
|
||||||
|
reminder: false,
|
||||||
|
},
|
||||||
|
isDisable_main: {
|
||||||
|
oreo: false,
|
||||||
|
pick: false,
|
||||||
|
retrieve: false,
|
||||||
|
comment: false,
|
||||||
|
},
|
||||||
|
reminderList: [],
|
||||||
|
// eslint-disable-next-line react/no-unused-state
|
||||||
|
statusToBe: 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
const { router } = getCurrentInstance();
|
||||||
|
const id = Number(router?.params.id);
|
||||||
|
this.setState({
|
||||||
|
id: id,
|
||||||
|
isMember: wechatUser.getAccess(),
|
||||||
|
});
|
||||||
|
getDisable(this, id);
|
||||||
|
this.setState({
|
||||||
|
isLoading: {
|
||||||
|
...this.state.isLoading,
|
||||||
|
framework: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onAddToOreo(): void {
|
||||||
|
this.setState({
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
modal: {
|
||||||
|
...this.state.show.modal,
|
||||||
|
oreo: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onAddComment(): void {
|
||||||
|
this.setState({
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
layout: {
|
||||||
|
...this.state.show.layout,
|
||||||
|
comment: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onRetrieved(): void {
|
||||||
|
this.setState({
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
modal: {
|
||||||
|
...this.state.show.modal,
|
||||||
|
retrieve: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onPick(): void {
|
||||||
|
this.setState({
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
modal: {
|
||||||
|
...this.state.show.modal,
|
||||||
|
pick: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onChangeStatus(): void {
|
||||||
|
this.setState({
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
actionSheet: {
|
||||||
|
...this.state.show.actionSheet,
|
||||||
|
status: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleOreoCancel(): void {
|
||||||
|
this.setState({
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
modal: {
|
||||||
|
...this.state.show.modal,
|
||||||
|
oreo: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleCommentCancel(): void {
|
||||||
|
this.setState({
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
layout: {
|
||||||
|
...this.state.show.layout,
|
||||||
|
comment: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleReminderCancel(): void {
|
||||||
|
this.setState({
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
layout: {
|
||||||
|
...this.state.show.layout,
|
||||||
|
reminder: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleRetrieveCancel(): void {
|
||||||
|
this.setState({
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
modal: {
|
||||||
|
...this.state.show.modal,
|
||||||
|
retrieve: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleStatusCancel(): void {
|
||||||
|
this.setState({
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
actionSheet: {
|
||||||
|
...this.state.show.actionSheet,
|
||||||
|
status: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handlePickCancel(): void {
|
||||||
|
this.setState({
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
modal: {
|
||||||
|
...this.state.show.modal,
|
||||||
|
pick: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleOreoConfirm(): void {
|
||||||
|
this.setState({
|
||||||
|
isDisable: {
|
||||||
|
...this.state.isDisable,
|
||||||
|
oreo: true,
|
||||||
|
},
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
modal: {
|
||||||
|
...this.state.show.modal,
|
||||||
|
oreo: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
addToOreo(this);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: {
|
||||||
|
...this.state.isDisable,
|
||||||
|
oreo: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleRetrieveConfirm(): void {
|
||||||
|
this.setState({
|
||||||
|
isDisable: {
|
||||||
|
...this.state.isDisable,
|
||||||
|
retrieve: true,
|
||||||
|
},
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
modal: {
|
||||||
|
...this.state.show.modal,
|
||||||
|
retrieve: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
retrieve(this);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: {
|
||||||
|
...this.state.isDisable,
|
||||||
|
retrieve: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
handlePickConfirm(): void {
|
||||||
|
this.setState({
|
||||||
|
isDisable: {
|
||||||
|
...this.state.isDisable,
|
||||||
|
pick: true,
|
||||||
|
},
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
modal: {
|
||||||
|
...this.state.show.modal,
|
||||||
|
pick: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
pickTicket(this);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: {
|
||||||
|
...this.state.isDisable,
|
||||||
|
pick: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleStatusChange(status: number): void {
|
||||||
|
if (status >= 3 && status <= 7) {
|
||||||
|
this.setState({
|
||||||
|
isDisable: {
|
||||||
|
...this.state.isDisable,
|
||||||
|
status: true,
|
||||||
|
},
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
actionSheet: {
|
||||||
|
...this.state.show.actionSheet,
|
||||||
|
status: false,
|
||||||
|
},
|
||||||
|
layout: {
|
||||||
|
...this.state.show.layout,
|
||||||
|
reminder: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// eslint-disable-next-line react/no-unused-state
|
||||||
|
statusToBe: status,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.setState({
|
||||||
|
isDisable: {
|
||||||
|
...this.state.isDisable,
|
||||||
|
status: true,
|
||||||
|
},
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
actionSheet: {
|
||||||
|
...this.state.show.actionSheet,
|
||||||
|
status: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// eslint-disable-next-line react/no-unused-state
|
||||||
|
statusToBe: status,
|
||||||
|
});
|
||||||
|
changeStatus(this, status);
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: {
|
||||||
|
...this.state.isDisable,
|
||||||
|
status: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setFloatLayout(show: boolean) {
|
||||||
|
this.setState({
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
layout: {
|
||||||
|
...this.state.show.layout,
|
||||||
|
comment: show,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleReminderChange(reminderList: Array<number>) {
|
||||||
|
this.setState({
|
||||||
|
reminderList: reminderList,
|
||||||
|
});
|
||||||
|
return reminderList;
|
||||||
|
}
|
||||||
|
|
||||||
|
onReminderSubmit() {
|
||||||
|
if (
|
||||||
|
this.state.reminderList.includes(1) &&
|
||||||
|
this.state.reminderList.includes(3)
|
||||||
|
) {
|
||||||
|
this.setState({
|
||||||
|
isDisable: {
|
||||||
|
...this.state.isDisable,
|
||||||
|
reminder: true,
|
||||||
|
},
|
||||||
|
show: {
|
||||||
|
...this.state.show,
|
||||||
|
layout: {
|
||||||
|
...this.state.show.layout,
|
||||||
|
reminder: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
changeStatus(this, this.state.statusToBe);
|
||||||
|
} else {
|
||||||
|
this.setState({
|
||||||
|
isDisable: {
|
||||||
|
...this.state.isDisable,
|
||||||
|
reminder: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
Taro.atMessage({
|
||||||
|
message: pt.get().ticketDetail.reminder.error,
|
||||||
|
type: 'error',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: {
|
||||||
|
...this.state.isDisable,
|
||||||
|
reminder: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
reminderOption = [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: pt.get().ticketDetail.reminder.r0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: pt.get().ticketDetail.reminder.r1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: pt.get().ticketDetail.reminder.r2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: pt.get().ticketDetail.reminder.r3,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
render(): ReactNode {
|
||||||
|
const middleButton = this.state.isMember ? (
|
||||||
|
<View>
|
||||||
|
<View
|
||||||
|
className='at-row'
|
||||||
|
style={{ paddingTop: '20rpx', paddingBottom: '20rpx', width: '100%' }}
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
className='at-col'
|
||||||
|
style={{ marginLeft: '20rpx', paddingRight: '10rpx', width: '50%' }}
|
||||||
|
>
|
||||||
|
<AtButton
|
||||||
|
loading={this.state.isLoading.pick}
|
||||||
|
disabled={
|
||||||
|
this.state.isDisable.pick || this.state.isDisable_main.pick
|
||||||
|
}
|
||||||
|
type='secondary'
|
||||||
|
onClick={this.onPick.bind(this)}
|
||||||
|
>
|
||||||
|
{pt.get().ticketDetail.button.pick}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
className='at-col'
|
||||||
|
style={{ marginLeft: '20rpx', paddingRight: '10rpx', width: '50%' }}
|
||||||
|
>
|
||||||
|
<AtButton
|
||||||
|
loading={this.state.isLoading.oreo}
|
||||||
|
disabled={
|
||||||
|
this.state.isDisable.oreo || this.state.isDisable_main.oreo
|
||||||
|
}
|
||||||
|
type='primary'
|
||||||
|
onClick={this.onAddToOreo.bind(this)}
|
||||||
|
>
|
||||||
|
{pt.get().ticketDetail.button.addToOreo}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
className='at-row'
|
||||||
|
style={{ paddingTop: '20rpx', paddingBottom: '40rpx', width: '100%' }}
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
className='at-col'
|
||||||
|
style={{ marginLeft: '20rpx', paddingRight: '10rpx', width: '50%' }}
|
||||||
|
>
|
||||||
|
<AtButton
|
||||||
|
loading={this.state.isLoading.status}
|
||||||
|
disabled={this.state.isDisable.status}
|
||||||
|
type='primary'
|
||||||
|
onClick={this.onChangeStatus.bind(this)}
|
||||||
|
>
|
||||||
|
{pt.get().ticketDetail.button.status}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
className='at-col'
|
||||||
|
style={{ marginLeft: '20rpx', paddingRight: '10rpx', width: '50%' }}
|
||||||
|
>
|
||||||
|
<AtButton
|
||||||
|
disabled={
|
||||||
|
this.state.isDisable.comment ||
|
||||||
|
this.state.isDisable_main.comment
|
||||||
|
}
|
||||||
|
loading={this.state.isLoading.comment}
|
||||||
|
type='secondary'
|
||||||
|
onClick={this.onAddComment.bind(this)}
|
||||||
|
>
|
||||||
|
{pt.get().ticketDetail.button.addNote}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
|
<View
|
||||||
|
className='at-row'
|
||||||
|
style={{ paddingTop: '20rpx', paddingBottom: '40rpx', width: '100%' }}
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
className='at-col'
|
||||||
|
style={{ marginLeft: '20rpx', paddingRight: '10rpx', width: '50%' }}
|
||||||
|
>
|
||||||
|
<AtButton
|
||||||
|
loading={this.state.isLoading.retrieve}
|
||||||
|
disabled={
|
||||||
|
this.state.isDisable.retrieve ||
|
||||||
|
this.state.isDisable_main.retrieve
|
||||||
|
}
|
||||||
|
type='primary'
|
||||||
|
onClick={this.onRetrieved.bind(this)}
|
||||||
|
>
|
||||||
|
{pt.get().ticketDetail.button.tookAway}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
className='at-col'
|
||||||
|
style={{ marginRight: '20rpx', paddingLeft: '10rpx', width: '50%' }}
|
||||||
|
>
|
||||||
|
<AtButton
|
||||||
|
disabled={
|
||||||
|
this.state.isDisable.comment || this.state.isDisable_main.comment
|
||||||
|
}
|
||||||
|
loading={this.state.isLoading.comment}
|
||||||
|
type='secondary'
|
||||||
|
onClick={this.onAddComment.bind(this)}
|
||||||
|
>
|
||||||
|
{pt.get().ticketDetail.button.addNote}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
|
||||||
|
const actionSheetItemList: Array<StatusStr> = [
|
||||||
|
'0',
|
||||||
|
'1',
|
||||||
|
'2',
|
||||||
|
'3',
|
||||||
|
'4',
|
||||||
|
'5',
|
||||||
|
'6',
|
||||||
|
'7',
|
||||||
|
];
|
||||||
|
|
||||||
|
const sheetItemsRenderer = actionSheetItemList.map((item, idx) => (
|
||||||
|
<AtActionSheetItem
|
||||||
|
key={idx}
|
||||||
|
onClick={this.handleStatusChange.bind(this, idx)}
|
||||||
|
>
|
||||||
|
{pt.get().ticketDetail.statusModifyMessage.get(item)}
|
||||||
|
</AtActionSheetItem>
|
||||||
|
));
|
||||||
|
|
||||||
|
const isInfoShow = {
|
||||||
|
device: true,
|
||||||
|
createdTime: true,
|
||||||
|
description: true,
|
||||||
|
info: wechatUser.getAccess() ? true : false,
|
||||||
|
current: true,
|
||||||
|
notelist: true,
|
||||||
|
showAllNotes: true,
|
||||||
|
pic: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View>
|
||||||
|
<AtMessage />
|
||||||
|
<AtModal
|
||||||
|
isOpened={this.state.show.modal.oreo}
|
||||||
|
title={pt.get().modal.addToOreo.title}
|
||||||
|
cancelText={pt.get().modal.cancel}
|
||||||
|
confirmText={pt.get().modal.confirm}
|
||||||
|
onCancel={this.handleOreoCancel.bind(this)}
|
||||||
|
onConfirm={this.handleOreoConfirm.bind(this)}
|
||||||
|
content={pt.get().modal.addToOreo.content}
|
||||||
|
/>
|
||||||
|
<AtModal
|
||||||
|
isOpened={this.state.show.modal.retrieve}
|
||||||
|
title={pt.get().modal.retrieve.title}
|
||||||
|
cancelText={pt.get().modal.cancel}
|
||||||
|
confirmText={pt.get().modal.confirm}
|
||||||
|
onCancel={this.handleRetrieveCancel.bind(this)}
|
||||||
|
onConfirm={this.handleRetrieveConfirm.bind(this)}
|
||||||
|
content={pt.get().modal.retrieve.content}
|
||||||
|
/>
|
||||||
|
<AtModal
|
||||||
|
isOpened={this.state.show.modal.pick}
|
||||||
|
title={pt.get().modal.pick.title}
|
||||||
|
cancelText={pt.get().modal.cancel}
|
||||||
|
confirmText={pt.get().modal.confirm}
|
||||||
|
onCancel={this.handlePickCancel.bind(this)}
|
||||||
|
onConfirm={this.handlePickConfirm.bind(this)}
|
||||||
|
content={pt.get().modal.pick.content}
|
||||||
|
/>
|
||||||
|
<AtFloatLayout
|
||||||
|
isOpened={this.state.show.layout.comment}
|
||||||
|
title={pt.get().ticketDetail.comment.title}
|
||||||
|
onClose={this.handleCommentCancel.bind(this)}
|
||||||
|
>
|
||||||
|
<Comment
|
||||||
|
setFloatLayout={this.setFloatLayout.bind(this)}
|
||||||
|
id={this.state.id}
|
||||||
|
didMount={this.state.show.layout.comment}
|
||||||
|
/>
|
||||||
|
</AtFloatLayout>
|
||||||
|
<AtFloatLayout
|
||||||
|
isOpened={this.state.show.layout.reminder}
|
||||||
|
title={pt.get().ticketDetail.reminder.title}
|
||||||
|
onClose={this.handleReminderCancel.bind(this)}
|
||||||
|
>
|
||||||
|
<AtForm onSubmit={this.onReminderSubmit.bind(this)}>
|
||||||
|
<AtCheckbox
|
||||||
|
options={this.reminderOption}
|
||||||
|
selectedList={this.state.reminderList}
|
||||||
|
onChange={this.handleReminderChange.bind(this)}
|
||||||
|
/>
|
||||||
|
<AtButton
|
||||||
|
loading={this.state.isLoading.reminder}
|
||||||
|
formType='submit'
|
||||||
|
type='primary'
|
||||||
|
disabled={this.state.isDisable.reminder}
|
||||||
|
>
|
||||||
|
{pt.get().button.buttonText.submit}
|
||||||
|
</AtButton>
|
||||||
|
</AtForm>
|
||||||
|
</AtFloatLayout>
|
||||||
|
<AtActionSheet
|
||||||
|
isOpened={this.state.show.actionSheet.status}
|
||||||
|
cancelText={pt.get().ticketDetail.status.cancel}
|
||||||
|
title={pt.get().ticketDetail.status.title}
|
||||||
|
onCancel={this.handleStatusCancel.bind(this)}
|
||||||
|
onClose={this.handleStatusCancel.bind(this)}
|
||||||
|
>
|
||||||
|
{sheetItemsRenderer}
|
||||||
|
</AtActionSheet>
|
||||||
|
{!this.state.isLoading.framework && (
|
||||||
|
<DetailFramework
|
||||||
|
middleButton={middleButton}
|
||||||
|
id={this.state.id}
|
||||||
|
isInfoShow={isInfoShow}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<PageFooter />
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import { FixStatus, Info } from '@/common';
|
||||||
|
|
||||||
|
export class TicketInfo {
|
||||||
|
id: number;
|
||||||
|
type: 0 | 1;
|
||||||
|
device: string;
|
||||||
|
deviceModel: string;
|
||||||
|
description: string;
|
||||||
|
createdTime: moment.Moment;
|
||||||
|
status: FixStatus;
|
||||||
|
info: Info;
|
||||||
|
workers: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export class TicketNote {
|
||||||
|
avatar: string;
|
||||||
|
id: number;
|
||||||
|
op: string;
|
||||||
|
type: 0 | 1 | 2 | 3;
|
||||||
|
content: string;
|
||||||
|
createdTime: moment.Moment;
|
||||||
|
pic: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ShowElements {
|
||||||
|
device: JSX.Element;
|
||||||
|
createdTime: JSX.Element;
|
||||||
|
description: JSX.Element;
|
||||||
|
info: JSX.Element;
|
||||||
|
current: JSX.Element;
|
||||||
|
notelist: JSX.Element;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StatusStr = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7';
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
usingComponents: {},
|
||||||
|
});
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import { View } from '@tarojs/components';
|
||||||
|
import {
|
||||||
|
AtActivityIndicator,
|
||||||
|
AtList,
|
||||||
|
AtPagination,
|
||||||
|
AtSearchBar,
|
||||||
|
AtToast,
|
||||||
|
} from 'taro-ui';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import moment from 'moment';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import PageFooter from '@/components/PageFooter/PageFooter';
|
||||||
|
import { RequestState } from '@/service';
|
||||||
|
import { getTicketList, searchTicketList } from '@/service/ticketList';
|
||||||
|
import { TicketListItem } from '@/components/TicketListItem/TicketListItem';
|
||||||
|
import './TicketList.scss';
|
||||||
|
|
||||||
|
interface TicketListState {
|
||||||
|
fixList: Array<TicketListItem>;
|
||||||
|
rs: RequestState;
|
||||||
|
currentPage: number;
|
||||||
|
totalPage: number;
|
||||||
|
pageSize: number;
|
||||||
|
search: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class TicketListPage extends Component<{}, TicketListState> {
|
||||||
|
state = {
|
||||||
|
fixList: [new TicketListItem(0, '', '', 1, moment())],
|
||||||
|
rs: new RequestState(),
|
||||||
|
currentPage: 1,
|
||||||
|
totalPage: 1,
|
||||||
|
pageSize: 8,
|
||||||
|
search: '',
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
Taro.setNavigationBarTitle({
|
||||||
|
title: pt.get().navBar.ticketList,
|
||||||
|
});
|
||||||
|
getTicketList(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
onPageChange(): void {
|
||||||
|
this.setState({
|
||||||
|
rs: new RequestState(),
|
||||||
|
});
|
||||||
|
getTicketList(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
onSearchChange(search): void {
|
||||||
|
this.setState({
|
||||||
|
search: search,
|
||||||
|
});
|
||||||
|
return search;
|
||||||
|
}
|
||||||
|
|
||||||
|
onActionClick(): void {
|
||||||
|
this.setState({
|
||||||
|
rs: new RequestState(),
|
||||||
|
});
|
||||||
|
searchTicketList(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
render(): ReactNode {
|
||||||
|
if (this.state.rs.loading) {
|
||||||
|
return (
|
||||||
|
<AtActivityIndicator
|
||||||
|
mode='center'
|
||||||
|
content={pt.get().actIndicator.loading}
|
||||||
|
></AtActivityIndicator>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!this.state.rs.success) {
|
||||||
|
return (
|
||||||
|
<AtToast
|
||||||
|
isOpened
|
||||||
|
text={pt.get().toast.error}
|
||||||
|
icon='close-circle'
|
||||||
|
></AtToast>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
const fixListRenderer = this.state.fixList.map((item) => item.render());
|
||||||
|
return (
|
||||||
|
<View>
|
||||||
|
<View style={{ marginTop: '20rpx', marginBottom: '20rpx' }}>
|
||||||
|
<AtSearchBar
|
||||||
|
actionName={pt.get().ticketList.search}
|
||||||
|
value={this.state.search}
|
||||||
|
onChange={this.onSearchChange.bind(this)}
|
||||||
|
onActionClick={this.onActionClick.bind(this)}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<AtList>{fixListRenderer}</AtList>
|
||||||
|
<View style={{ marginTop: '40rpx' }}>
|
||||||
|
<AtPagination
|
||||||
|
icon
|
||||||
|
total={this.state.totalPage}
|
||||||
|
pageSize={this.state.pageSize}
|
||||||
|
current={this.state.currentPage}
|
||||||
|
onPageChange={this.onPageChange.bind(this)}
|
||||||
|
></AtPagination>
|
||||||
|
</View>
|
||||||
|
<PageFooter />
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,55 +4,66 @@ import { AtTimeline } from 'taro-ui';
|
|||||||
import pt from '@/plain-text';
|
import pt from '@/plain-text';
|
||||||
import tick from '@/assets/icons/MainPage/tick.svg';
|
import tick from '@/assets/icons/MainPage/tick.svg';
|
||||||
import cross from '@/assets/icons/MainPage/cross.svg';
|
import cross from '@/assets/icons/MainPage/cross.svg';
|
||||||
|
import clock from '@/assets/icons/MainPage/offduty.svg';
|
||||||
|
import wechatUser from '@/wechat';
|
||||||
|
import moment from 'moment';
|
||||||
|
|
||||||
export class DutyData {
|
export class DutyData {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.isInDuty = false;
|
this.isInDuty = false;
|
||||||
this.inDutyCnt = 3;
|
this.inDutyCnt = 3;
|
||||||
this.currentDuty = '2';
|
this.currentDuty = '1';
|
||||||
this.offDutyReason = '学园维修';
|
this.otherDutyStart = '2024-03-07T13:30:48.523303';
|
||||||
this.dutyRecoverTime = '下周一';
|
this.otherDutyEnd = '2024-03-07T16:00:48.523303';
|
||||||
|
this.dutyRecoverTime = '13:30';
|
||||||
|
this.place = '东三-204';
|
||||||
}
|
}
|
||||||
|
|
||||||
isInDuty: boolean;
|
isInDuty: boolean;
|
||||||
inDutyCnt: number;
|
inDutyCnt: number;
|
||||||
currentDuty: 'off' | '1' | '2' | '3';
|
currentDuty: 'off' | '0' | '1' | '2' | '3' | 'others';
|
||||||
offDutyReason: string; // from backend
|
otherDutyStart: string;
|
||||||
dutyRecoverTime: string; // from backend
|
otherDutyEnd: string;
|
||||||
|
offDutyReason: string;
|
||||||
|
dutyRecoverTime: string;
|
||||||
|
place: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Card extends Component {
|
class Card extends Component {
|
||||||
props = {
|
props = {
|
||||||
isInDuty: false,
|
isInDuty: false,
|
||||||
|
place: pt.get().common.place,
|
||||||
};
|
};
|
||||||
render(): ReactNode {
|
render(): ReactNode {
|
||||||
const inDuty = this.props.isInDuty;
|
const inDuty = this.props.isInDuty;
|
||||||
|
const place = this.props.place;
|
||||||
const dc = pt.get().mainPage.dutyCard;
|
const dc = pt.get().mainPage.dutyCard;
|
||||||
const title = inDuty ? dc.inDuty.title : dc.offDuty.title;
|
const title = inDuty ? dc.inDuty.title : dc.offDuty.title;
|
||||||
const iconsrc = inDuty ? tick : cross;
|
const iconsrc = inDuty ? tick : wechatUser.getAccess() ? clock : cross;
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
marginBottom: 20,
|
marginBottom: '40rpx',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
src={iconsrc}
|
src={iconsrc}
|
||||||
style={{
|
style={{
|
||||||
width: 24,
|
width: '48rpx',
|
||||||
height: 24,
|
height: '48rpx',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
marginLeft: 10,
|
marginLeft: '20rpx',
|
||||||
fontSize: 36,
|
fontSize: '60rpx',
|
||||||
|
fontWeight: 'bold',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{title}
|
{'[' + place + '] ' + title}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -61,6 +72,11 @@ class Card extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class DutyInfo extends Component {
|
export class DutyInfo extends Component {
|
||||||
|
state: {
|
||||||
|
isLoading: false;
|
||||||
|
isDisable: false;
|
||||||
|
};
|
||||||
|
|
||||||
props = {
|
props = {
|
||||||
data: new DutyData(),
|
data: new DutyData(),
|
||||||
};
|
};
|
||||||
@@ -70,11 +86,21 @@ export class DutyInfo extends Component {
|
|||||||
const od = pt.get().mainPage.dutyCard.offDuty;
|
const od = pt.get().mainPage.dutyCard.offDuty;
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<Card isInDuty={data.isInDuty} />
|
<Card isInDuty={data.isInDuty} place={data.place} />
|
||||||
<AtTimeline
|
<AtTimeline
|
||||||
items={[
|
items={[
|
||||||
{ title: od.reason(data.offDutyReason) },
|
{
|
||||||
{ title: od.recoverTime(data.dutyRecoverTime) },
|
title:
|
||||||
|
data.currentDuty == '0'
|
||||||
|
? od.reason(pt.get().common.offDutyReason)
|
||||||
|
: od.reason(data.offDutyReason as string),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:
|
||||||
|
data.currentDuty == '0'
|
||||||
|
? od.recoverTime(pt.get().common.dutyRecoverTime)
|
||||||
|
: od.recoverTime(data.dutyRecoverTime as string),
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
@@ -86,11 +112,25 @@ export class DutyInfo extends Component {
|
|||||||
const id = pt.get().mainPage.dutyCard.inDuty;
|
const id = pt.get().mainPage.dutyCard.inDuty;
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<Card isInDuty={data.isInDuty} />
|
<Card isInDuty={data.isInDuty} place={data.place} />
|
||||||
<AtTimeline
|
<AtTimeline
|
||||||
items={[
|
items={[
|
||||||
{ title: id.currentDutyText(data.currentDuty) },
|
{
|
||||||
{ title: id.inDutyCnt(data.inDutyCnt) },
|
title:
|
||||||
|
data.currentDuty == 'others'
|
||||||
|
? id.currentDutyText('others') +
|
||||||
|
moment(data.otherDutyStart).format('H:mm') +
|
||||||
|
' - ' +
|
||||||
|
moment(data.otherDutyEnd).format('H:mm')
|
||||||
|
: id.currentDutyText(data.currentDuty || 'off'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: id.inDutyCnt(
|
||||||
|
data.inDutyCnt === 0
|
||||||
|
? pt.get().common.zeroMemberOnDuty
|
||||||
|
: data.inDutyCnt.toString(),
|
||||||
|
),
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -2,12 +2,19 @@ import { Component, ReactNode } from 'react';
|
|||||||
import { View } from '@tarojs/components';
|
import { View } from '@tarojs/components';
|
||||||
import { AtTimeline } from 'taro-ui';
|
import { AtTimeline } from 'taro-ui';
|
||||||
import pt from '@/plain-text';
|
import pt from '@/plain-text';
|
||||||
|
import wechatUser from '@/wechat';
|
||||||
|
|
||||||
export class StepInfo extends Component {
|
export class StepInfo extends Component {
|
||||||
render(): ReactNode {
|
render(): ReactNode {
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<AtTimeline items={pt.get().mainPage.stepList}></AtTimeline>
|
<AtTimeline
|
||||||
|
items={
|
||||||
|
wechatUser.getAccess()
|
||||||
|
? pt.get().memberPage.stepList
|
||||||
|
: pt.get().mainPage.stepList
|
||||||
|
}
|
||||||
|
></AtTimeline>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -17,7 +24,13 @@ export class TipsInfo extends Component {
|
|||||||
render(): ReactNode {
|
render(): ReactNode {
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<AtTimeline items={pt.get().mainPage.tipsList}></AtTimeline>
|
<AtTimeline
|
||||||
|
items={
|
||||||
|
wechatUser.getAccess()
|
||||||
|
? pt.get().memberPage.tipsList
|
||||||
|
: pt.get().mainPage.tipsList
|
||||||
|
}
|
||||||
|
></AtTimeline>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,57 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { View } from '@tarojs/components';
|
import { View, Image } from '@tarojs/components';
|
||||||
|
import { AtButton } from 'taro-ui';
|
||||||
import pt from '@/plain-text';
|
import pt from '@/plain-text';
|
||||||
|
import wechatUser from '@/wechat';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
|
||||||
|
const logo = 'https://wiki.zjueva.net/images/evalogo_hd.png';
|
||||||
|
|
||||||
export default class TitleCard extends React.Component {
|
export default class TitleCard extends React.Component {
|
||||||
|
onAskLeave() {
|
||||||
|
Taro.redirectTo({
|
||||||
|
url: '/pages/AskLeave/AskLeave',
|
||||||
|
});
|
||||||
|
}
|
||||||
render(): React.ReactNode {
|
render(): React.ReactNode {
|
||||||
const mainPage = pt.get().mainPage;
|
const mainPage = pt.get().mainPage;
|
||||||
|
const memberPage = pt.get().memberPage;
|
||||||
return (
|
return (
|
||||||
<View className='page-title'>
|
<View className='at-row at-row__align--center at-row__justify--start'>
|
||||||
<View className='at-article__h1'>{mainPage.mainTitleLine}</View>
|
<View className='at-col at-col-1 at-col--auto'>
|
||||||
<View className='at-article__h2'>{mainPage.subTitleLine}</View>
|
<Image
|
||||||
|
style='width: 100rpx; height: 100rpx; margin-left: 30rpx; border-radius: 50rpx'
|
||||||
|
src={wechatUser.getAccess() ? wechatUser.getInfo().avatar : logo}
|
||||||
|
mode='aspectFit'
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
className={
|
||||||
|
wechatUser.getAccess()
|
||||||
|
? 'at-col page-title at-col-1 at-col--auto'
|
||||||
|
: 'at-col page-title at-col-10 at-col--wrap'
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||||
|
{wechatUser.getAccess()
|
||||||
|
? memberPage.titleLine.main.index + wechatUser.getInfo().name
|
||||||
|
: mainPage.titleLine.main}
|
||||||
|
</View>
|
||||||
|
<View className='at-article__h2'>
|
||||||
|
{wechatUser.getAccess()
|
||||||
|
? memberPage.titleLine.sub.index
|
||||||
|
: mainPage.titleLine.sub}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
{wechatUser.getAccess() ? (
|
||||||
|
<View className='at-col at-col-1 at-col--auto'>
|
||||||
|
<AtButton type='secondary' onClick={this.onAskLeave}>
|
||||||
|
{pt.get().mainPage.askLeave}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
|
<View></View>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,35 @@
|
|||||||
import { View } from '@tarojs/components';
|
import { View } from '@tarojs/components';
|
||||||
import { Component, ReactNode } from 'react';
|
import { Component, ReactNode } from 'react';
|
||||||
import Taro from '@tarojs/taro';
|
import Taro from '@tarojs/taro';
|
||||||
import { AtCard, AtAccordion } from 'taro-ui';
|
import {
|
||||||
|
AtCard,
|
||||||
|
AtInputNumber,
|
||||||
|
AtButton,
|
||||||
|
AtList,
|
||||||
|
AtListItem,
|
||||||
|
AtActivityIndicator,
|
||||||
|
AtToast,
|
||||||
|
} from 'taro-ui';
|
||||||
|
import clockIcon from '@/assets/icons/MainPage/clock.svg';
|
||||||
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 pt from '@/plain-text';
|
import pt from '@/plain-text';
|
||||||
|
import { getDutyInfo } from '@/service/dutyInfo';
|
||||||
|
import { RequestState } from '@/service';
|
||||||
|
import moment from 'moment';
|
||||||
|
import wechatUser from '@/wechat';
|
||||||
|
import { getMemberDutyInfo } from '@/service/memberDutyInfo';
|
||||||
|
import { getUncompletedTicketList } from '@/service/uncompletedTicket';
|
||||||
|
import { changeDutyCnt } from '@/service/changeDutyCount';
|
||||||
|
import { TicketListItem } from '@/components/TicketListItem/TicketListItem';
|
||||||
|
import { ExpandItem } from '@/components/ExpandItem/ExpandItem';
|
||||||
import './index.scss';
|
import './index.scss';
|
||||||
import TitleCard from './TitleCard';
|
import TitleCard from './TitleCard';
|
||||||
import { DutyInfo, DutyData } from './DutyInfo';
|
import { DutyInfo, DutyData } from './DutyInfo';
|
||||||
import { StepInfo, TipsInfo } from './StepTipsInfo';
|
import { StepInfo, TipsInfo } from './StepTipsInfo';
|
||||||
|
|
||||||
|
const submitInterval = 5000;
|
||||||
|
|
||||||
class CardContent {
|
class CardContent {
|
||||||
title: string;
|
title: string;
|
||||||
note: string;
|
note: string;
|
||||||
@@ -19,7 +39,7 @@ class CardContent {
|
|||||||
|
|
||||||
function mainPageCard(c: CardContent): JSX.Element {
|
function mainPageCard(c: CardContent): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<View style={{ marginTop: 10 }}>
|
<View style={{ marginTop: '20rpx', marginBottom: '40rpx' }}>
|
||||||
<AtCard note={c.note} extra={c.extra} title={c.title}>
|
<AtCard note={c.note} extra={c.extra} title={c.title}>
|
||||||
{c.content()}
|
{c.content()}
|
||||||
</AtCard>
|
</AtCard>
|
||||||
@@ -27,56 +47,75 @@ function mainPageCard(c: CardContent): JSX.Element {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
class ExpandItem extends Component {
|
interface MainPageState {
|
||||||
state = {
|
fixList: Array<TicketListItem>;
|
||||||
open: false,
|
rs: RequestState;
|
||||||
};
|
dutyData: DutyData;
|
||||||
props = {
|
dutyInfoCard: CardContent;
|
||||||
title: '',
|
stepInfoCard: CardContent;
|
||||||
content: <View></View>,
|
tipsInfoCard: CardContent;
|
||||||
};
|
isLoading: boolean;
|
||||||
|
isDisable: boolean;
|
||||||
handleClick(value: boolean) {
|
|
||||||
this.setState({ open: value });
|
|
||||||
}
|
|
||||||
|
|
||||||
render(): ReactNode {
|
|
||||||
return (
|
|
||||||
<View>
|
|
||||||
<AtAccordion
|
|
||||||
open={this.state.open}
|
|
||||||
onClick={this.handleClick.bind(this)}
|
|
||||||
title={this.props.title}
|
|
||||||
>
|
|
||||||
{this.props.content}
|
|
||||||
</AtAccordion>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Index extends Component {
|
export default class MainPage extends Component<{}, MainPageState> {
|
||||||
state = {
|
state = {
|
||||||
dutyData: new DutyData(),
|
dutyData: new DutyData(),
|
||||||
dutyInfoCard: {
|
dutyInfoCard: {
|
||||||
title: pt.get().mainPage.cardTitle.dutyInfo,
|
title: '',
|
||||||
note: 'Tips',
|
note: '',
|
||||||
extra: '额外信息',
|
extra: '',
|
||||||
|
content: () => <></>,
|
||||||
|
},
|
||||||
|
stepInfoCard: {
|
||||||
|
title: '',
|
||||||
|
note: '',
|
||||||
|
extra: '',
|
||||||
|
content: () => <></>,
|
||||||
|
},
|
||||||
|
tipsInfoCard: {
|
||||||
|
title: '',
|
||||||
|
note: '',
|
||||||
|
extra: '',
|
||||||
|
content: () => <></>,
|
||||||
|
},
|
||||||
|
fixList: [new TicketListItem(0, '', '', 1, moment())],
|
||||||
|
rs: new RequestState(),
|
||||||
|
isLoading: false,
|
||||||
|
isDisable: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
const ptPage = wechatUser.getAccess() ? 'memberPage' : 'mainPage';
|
||||||
|
this.setState({
|
||||||
|
dutyData: new DutyData(),
|
||||||
|
dutyInfoCard: {
|
||||||
|
title: pt.get()[ptPage].cardTitle.dutyInfo,
|
||||||
|
note: pt.get()[ptPage].cardTips.dutyInfo,
|
||||||
|
extra: pt.get()[ptPage].extraInfo.dutyInfo,
|
||||||
content: () => <DutyInfo data={this.state.dutyData} />,
|
content: () => <DutyInfo data={this.state.dutyData} />,
|
||||||
},
|
},
|
||||||
stepInfoCard: {
|
stepInfoCard: {
|
||||||
title: pt.get().mainPage.cardTitle.stepInfo,
|
title: pt.get()[ptPage].cardTitle.stepInfo,
|
||||||
note: 'Tips 请在20:30以前取走自己的物品哦',
|
note: pt.get()[ptPage].cardTips.stepInfo,
|
||||||
extra: '额外信息',
|
extra: pt.get()[ptPage].extraInfo.dutyInfo,
|
||||||
content: () => <StepInfo />,
|
content: () => <StepInfo />,
|
||||||
},
|
},
|
||||||
tipsInfoCard: {
|
tipsInfoCard: {
|
||||||
title: pt.get().mainPage.cardTitle.tipsInfo,
|
title: pt.get()[ptPage].cardTitle.tipsInfo,
|
||||||
note: 'Tips',
|
note: pt.get()[ptPage].cardTips.tipsInfo,
|
||||||
extra: '额外信息',
|
extra: pt.get()[ptPage].extraInfo.dutyInfo,
|
||||||
content: () => <TipsInfo />,
|
content: () => <TipsInfo />,
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
|
if (wechatUser.getAccess()) {
|
||||||
|
getMemberDutyInfo(this);
|
||||||
|
getUncompletedTicketList(this);
|
||||||
|
} else {
|
||||||
|
getDutyInfo(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 以下是TabBar相关
|
// 以下是TabBar相关
|
||||||
pageCtx = Taro.getCurrentInstance().page;
|
pageCtx = Taro.getCurrentInstance().page;
|
||||||
@@ -86,21 +125,157 @@ export default class Index extends Component {
|
|||||||
}
|
}
|
||||||
// 以上是TabBar相关
|
// 以上是TabBar相关
|
||||||
|
|
||||||
|
handleCnt(inDutyCnt: number) {
|
||||||
|
this.setState({
|
||||||
|
dutyData: {
|
||||||
|
...this.state.dutyData,
|
||||||
|
inDutyCnt: inDutyCnt,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return inDutyCnt;
|
||||||
|
}
|
||||||
|
|
||||||
|
onChangeCnt() {
|
||||||
|
this.setState({
|
||||||
|
isDisable: true,
|
||||||
|
});
|
||||||
|
changeDutyCnt(this);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
ticketListPage() {
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: '/pages/TicketList/TicketList',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
conclusionPage() {
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: '/pages/Conclusion/Conclusion',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
render(): ReactNode {
|
render(): ReactNode {
|
||||||
const mainPage = pt.get().mainPage;
|
const mainPage = pt.get().mainPage;
|
||||||
|
const memberPage = pt.get().memberPage;
|
||||||
|
if (this.state.rs.loading) {
|
||||||
|
return (
|
||||||
|
<AtActivityIndicator
|
||||||
|
mode='center'
|
||||||
|
content={pt.get().actIndicator.loading}
|
||||||
|
></AtActivityIndicator>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!this.state.rs.success) {
|
||||||
|
return (
|
||||||
|
<AtToast
|
||||||
|
isOpened
|
||||||
|
text={pt.get().toast.error}
|
||||||
|
icon='close-circle'
|
||||||
|
></AtToast>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
const fixListRenderer = this.state.fixList.map((item) => item.render());
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<TitleCard />
|
<TitleCard />
|
||||||
<View style={{ marginTop: 30 }}>
|
<View style={{ width: '94%', marginLeft: '3%' }}>
|
||||||
|
<View style={{ marginTop: '60rpx' }}>
|
||||||
{mainPageCard(this.state.dutyInfoCard)}
|
{mainPageCard(this.state.dutyInfoCard)}
|
||||||
{mainPageCard(this.state.tipsInfoCard)}
|
{mainPageCard(this.state.tipsInfoCard)}
|
||||||
|
{wechatUser.getAccess() && this.state.dutyData.isInDuty ? (
|
||||||
|
<ExpandItem
|
||||||
|
title={memberPage.expandTitle.admin}
|
||||||
|
content={
|
||||||
|
<View style={{ marginBottom: '40rpx' }}>
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
marginBottom: '40rpx',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
className='.at-article__h3'
|
||||||
|
style={{
|
||||||
|
marginTop: '40rpx',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{pt.get().memberPage.dutyCount.text}
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
marginTop: '40rpx',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<AtInputNumber
|
||||||
|
type='number'
|
||||||
|
min={0}
|
||||||
|
max={10}
|
||||||
|
step={1}
|
||||||
|
value={this.state.dutyData.inDutyCnt}
|
||||||
|
onChange={this.handleCnt.bind(this)}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View style={{ marginLeft: 'auto', marginTop: '40rpx' }}>
|
||||||
|
<AtButton
|
||||||
|
type='secondary'
|
||||||
|
size='small'
|
||||||
|
loading={this.state.isLoading}
|
||||||
|
disabled={this.state.isDisable}
|
||||||
|
onClick={this.onChangeCnt.bind(this)}
|
||||||
|
>
|
||||||
|
{pt.get().memberPage.dutyCount.button}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View>
|
||||||
|
<AtButton type='primary' onClick={this.conclusionPage}>
|
||||||
|
{pt.get().button.indexText.conclusion}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<View></View>
|
||||||
|
)}
|
||||||
<ExpandItem
|
<ExpandItem
|
||||||
title={mainPage.expandTitle.stepInfo}
|
title={mainPage.expandTitle.stepInfo}
|
||||||
content={mainPageCard(this.state.stepInfoCard)}
|
content={mainPageCard(this.state.stepInfoCard)}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
{wechatUser.getAccess() ? (
|
||||||
|
<View style={{ marginTop: '40rpx' }}>
|
||||||
|
<View
|
||||||
|
className='at-article__h3'
|
||||||
|
style={{ marginBottom: '20rpx', fontWeight: 'bold' }}
|
||||||
|
>
|
||||||
|
{(this.state.fixList.length === 0
|
||||||
|
? memberPage.ticketList.nohint
|
||||||
|
: '') + memberPage.ticketList.hint}
|
||||||
|
</View>
|
||||||
|
<AtList>{fixListRenderer}</AtList>
|
||||||
|
<AtList>
|
||||||
|
<AtListItem
|
||||||
|
title={pt.get().memberPage.ticketList.title}
|
||||||
|
note={pt.get().memberPage.ticketList.note}
|
||||||
|
arrow='right'
|
||||||
|
thumb={clockIcon}
|
||||||
|
onClick={this.ticketListPage}
|
||||||
|
/>
|
||||||
|
</AtList>
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
|
<View></View>
|
||||||
|
)}
|
||||||
<PageFooter />
|
<PageFooter />
|
||||||
</View>
|
</View>
|
||||||
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,76 @@
|
|||||||
import { View, Text } from '@tarojs/components';
|
import { View } from '@tarojs/components';
|
||||||
import { Component, ReactNode } from 'react';
|
import { Component, ReactNode } from 'react';
|
||||||
import Taro from '@tarojs/taro';
|
import Taro from '@tarojs/taro';
|
||||||
import type CustomTabBar from '../../custom-tab-bar';
|
import {
|
||||||
|
AtForm,
|
||||||
|
AtInput,
|
||||||
|
AtButton,
|
||||||
|
AtCheckbox,
|
||||||
|
AtCard,
|
||||||
|
AtSegmentedControl,
|
||||||
|
AtMessage,
|
||||||
|
} from 'taro-ui';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import PageFooter from '@/components/PageFooter/PageFooter';
|
||||||
|
import { submitTicket } from '@/service/submitTicket';
|
||||||
|
import type CustomTabBar from '@/custom-tab-bar';
|
||||||
|
import repairLogo from '@/assets/icons/RepairPage/repair.svg';
|
||||||
|
import DetailFramework from '@/components/DetailFramework/DetailFramework';
|
||||||
|
import { getCurrentTicket } from '@/service/currentTicket';
|
||||||
|
import { randomInt } from '@/utils/random';
|
||||||
|
import wechatUser from '@/wechat';
|
||||||
import './repair.scss';
|
import './repair.scss';
|
||||||
|
|
||||||
export default class RepairPage extends Component {
|
interface RepairPageState {
|
||||||
|
type: 0 | 1;
|
||||||
|
device: string;
|
||||||
|
deviceModel: string;
|
||||||
|
owner: string;
|
||||||
|
phone: string;
|
||||||
|
description: string;
|
||||||
|
isLoading: boolean;
|
||||||
|
isDisable: boolean;
|
||||||
|
checkedList: Array<number>;
|
||||||
|
currentTicketsIdName: Array<Map<number, string>>;
|
||||||
|
}
|
||||||
|
|
||||||
|
const submitInterval = 5000;
|
||||||
|
|
||||||
|
const middleButton = <View></View>;
|
||||||
|
|
||||||
|
const isInfoShow = {
|
||||||
|
device: false,
|
||||||
|
createdTime: true,
|
||||||
|
description: false,
|
||||||
|
current: true,
|
||||||
|
notelist: true,
|
||||||
|
showAllNotes: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default class RepairPage extends Component<{}, RepairPageState> {
|
||||||
|
state = {
|
||||||
|
type: 1 as 0 | 1,
|
||||||
|
device: '',
|
||||||
|
deviceModel: '',
|
||||||
|
owner: wechatUser.getInfo().name,
|
||||||
|
phone: wechatUser.getInfo().phone,
|
||||||
|
description: '',
|
||||||
|
isLoading: false,
|
||||||
|
isDisable: true,
|
||||||
|
checkedList: [0],
|
||||||
|
currentTicketsIdName: [] as Array<Map<number, string>>,
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
getCurrentTicket(this);
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
}
|
||||||
|
|
||||||
// 以下是TabBar相关
|
// 以下是TabBar相关
|
||||||
pageCtx = Taro.getCurrentInstance().page;
|
pageCtx = Taro.getCurrentInstance().page;
|
||||||
componentDidShow() {
|
componentDidShow() {
|
||||||
@@ -13,10 +79,246 @@ export default class RepairPage extends Component {
|
|||||||
}
|
}
|
||||||
// 以上是TabBar相关
|
// 以上是TabBar相关
|
||||||
|
|
||||||
|
handleTypeChange(type: 0 | 1) {
|
||||||
|
this.setState({
|
||||||
|
type: type,
|
||||||
|
});
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleDeviceChange(device: string) {
|
||||||
|
this.setState({
|
||||||
|
device: device,
|
||||||
|
});
|
||||||
|
return device;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleDeviceModelChange(deviceModel: string) {
|
||||||
|
this.setState({
|
||||||
|
deviceModel: deviceModel,
|
||||||
|
});
|
||||||
|
return deviceModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleOwnerChange(owner: string) {
|
||||||
|
this.setState({
|
||||||
|
owner: owner,
|
||||||
|
});
|
||||||
|
return owner;
|
||||||
|
}
|
||||||
|
|
||||||
|
handlePhoneChange(phone: string) {
|
||||||
|
this.setState({
|
||||||
|
phone: phone,
|
||||||
|
});
|
||||||
|
return phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleDescriptionChange(description: string) {
|
||||||
|
this.setState({
|
||||||
|
description: description,
|
||||||
|
});
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
checkboxOption = [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: pt.get().repairPage.checkboxText.none,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: pt.get().repairPage.checkboxText.usbDisk,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: pt.get().repairPage.checkboxText.mouseOrReceiver,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: pt.get().repairPage.checkboxText.powerAdapter,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 4,
|
||||||
|
label: pt.get().repairPage.checkboxText.others.label,
|
||||||
|
desc: pt.get().repairPage.checkboxText.others.desc,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
handleCheckboxChange(checkedList: Array<number>) {
|
||||||
|
this.setState({
|
||||||
|
checkedList: checkedList,
|
||||||
|
});
|
||||||
|
return checkedList;
|
||||||
|
}
|
||||||
|
|
||||||
|
onSubmit() {
|
||||||
|
this.setState({
|
||||||
|
isDisable: true,
|
||||||
|
});
|
||||||
|
if (
|
||||||
|
this.state.description == '' ||
|
||||||
|
this.state.device == '' ||
|
||||||
|
this.state.deviceModel == '' ||
|
||||||
|
this.state.owner == '' ||
|
||||||
|
this.state.phone == '' ||
|
||||||
|
this.state.checkedList.length === 0
|
||||||
|
) {
|
||||||
|
Taro.atMessage({
|
||||||
|
message: pt.get().button.submitText.blank,
|
||||||
|
type: 'error',
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
submitTicket(this);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
}
|
||||||
|
|
||||||
render(): ReactNode {
|
render(): ReactNode {
|
||||||
return (
|
const hasContinuingticket = this.state.currentTicketsIdName.length !== 0;
|
||||||
|
const ticketsRenderer = hasContinuingticket ? (
|
||||||
<View>
|
<View>
|
||||||
<Text>Repair Page</Text>
|
<View
|
||||||
|
className='at-article__h3'
|
||||||
|
style={{ marginBottom: '20rpx', fontWeight: 'bold' }}
|
||||||
|
>
|
||||||
|
{pt.get().repairPage.currentTicket.hint}
|
||||||
|
</View>
|
||||||
|
{this.state.currentTicketsIdName.map((pair, idx) => (
|
||||||
|
<View key={idx} style={{ marginBottom: '20rpx' }}>
|
||||||
|
<AtCard
|
||||||
|
title={pair.values().next().value} //pair.keys().next().value == ticket['device'] + ' ' + ticket['deviceModel']
|
||||||
|
extra={pt.get().repairPage.currentTicket.extra}
|
||||||
|
onClick={() => {
|
||||||
|
Taro.navigateTo({
|
||||||
|
url:
|
||||||
|
'/pages/TicketDetail/TicketDetail?id=' +
|
||||||
|
pair.keys().next().value,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
note={
|
||||||
|
pt.get().tips.tipsText[
|
||||||
|
randomInt(0, pt.get().tips.tipsText.length - 1)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<DetailFramework
|
||||||
|
id={pair.keys().next().value} //pair.keys().next().value == id
|
||||||
|
isInfoShow={isInfoShow}
|
||||||
|
middleButton={middleButton}
|
||||||
|
/>
|
||||||
|
</AtCard>
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
|
<View
|
||||||
|
className='at-article__h3'
|
||||||
|
style={{ marginBottom: '20rpx', fontWeight: 'bold' }}
|
||||||
|
>
|
||||||
|
{pt.get().repairPage.currentTicket.nohint}
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
<View style={{ width: '94%', marginLeft: '3%' }}>
|
||||||
|
<AtMessage />
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
marginTop: '20rpx',
|
||||||
|
marginBottom: '40rpx',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{ticketsRenderer}
|
||||||
|
</View>
|
||||||
|
<AtCard
|
||||||
|
note={pt.get().repairPage.cardText.note}
|
||||||
|
title={pt.get().repairPage.cardText.title}
|
||||||
|
thumb={repairLogo}
|
||||||
|
>
|
||||||
|
<AtForm onSubmit={this.onSubmit.bind(this)}>
|
||||||
|
<AtSegmentedControl
|
||||||
|
values={[
|
||||||
|
pt.get().repairPage.typeText.appliance,
|
||||||
|
pt.get().repairPage.typeText.computer,
|
||||||
|
]}
|
||||||
|
onClick={this.handleTypeChange.bind(this)}
|
||||||
|
current={this.state.type}
|
||||||
|
/>
|
||||||
|
<AtInput
|
||||||
|
clear
|
||||||
|
required
|
||||||
|
name='device'
|
||||||
|
title={pt.get().repairPage.deviceText.title}
|
||||||
|
type='text'
|
||||||
|
placeholder={pt.get().repairPage.deviceText.placeholder}
|
||||||
|
value={this.state.device}
|
||||||
|
onChange={this.handleDeviceChange.bind(this)}
|
||||||
|
/>
|
||||||
|
<AtInput
|
||||||
|
clear
|
||||||
|
required
|
||||||
|
name='deviceModel'
|
||||||
|
title={pt.get().repairPage.deviceModelText.title}
|
||||||
|
type='text'
|
||||||
|
placeholder={pt.get().repairPage.deviceModelText.placeholder}
|
||||||
|
value={this.state.deviceModel}
|
||||||
|
onChange={this.handleDeviceModelChange.bind(this)}
|
||||||
|
/>
|
||||||
|
<AtInput
|
||||||
|
clear
|
||||||
|
required
|
||||||
|
name='owner'
|
||||||
|
title={pt.get().repairPage.ownerText.title}
|
||||||
|
type='text'
|
||||||
|
placeholder={pt.get().repairPage.ownerText.placeholder}
|
||||||
|
value={this.state.owner}
|
||||||
|
onChange={this.handleOwnerChange.bind(this)}
|
||||||
|
/>
|
||||||
|
<AtInput
|
||||||
|
clear
|
||||||
|
required
|
||||||
|
name='phone'
|
||||||
|
title={pt.get().repairPage.phoneText.title}
|
||||||
|
type='number'
|
||||||
|
placeholder={pt.get().repairPage.phoneText.placeholder}
|
||||||
|
value={this.state.phone}
|
||||||
|
onChange={this.handlePhoneChange.bind(this)}
|
||||||
|
/>
|
||||||
|
<AtInput
|
||||||
|
clear
|
||||||
|
required
|
||||||
|
name='description'
|
||||||
|
title={pt.get().repairPage.descriptionText.title}
|
||||||
|
type='text'
|
||||||
|
placeholder={pt.get().repairPage.descriptionText.placeholder}
|
||||||
|
value={this.state.description}
|
||||||
|
onChange={this.handleDescriptionChange.bind(this)}
|
||||||
|
/>
|
||||||
|
<AtCheckbox
|
||||||
|
options={this.checkboxOption}
|
||||||
|
selectedList={this.state.checkedList}
|
||||||
|
onChange={this.handleCheckboxChange.bind(this)}
|
||||||
|
/>
|
||||||
|
<AtButton
|
||||||
|
loading={this.state.isLoading}
|
||||||
|
formType='submit'
|
||||||
|
type='primary'
|
||||||
|
disabled={this.state.isDisable}
|
||||||
|
>
|
||||||
|
{pt.get().button.buttonText.submit}
|
||||||
|
</AtButton>
|
||||||
|
</AtForm>
|
||||||
|
</AtCard>
|
||||||
|
<PageFooter />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
usingComponents: {},
|
||||||
|
});
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import { Image, View } from '@tarojs/components';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import PageFooter from '@/components/PageFooter/PageFooter';
|
||||||
|
import './about.scss';
|
||||||
|
|
||||||
|
export default class AboutPage extends Component {
|
||||||
|
componentDidMount(): void {
|
||||||
|
Taro.setNavigationBarTitle({
|
||||||
|
title: pt.get().navBar.user.about,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
render(): ReactNode {
|
||||||
|
return (
|
||||||
|
<View>
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
marginTop: '200rpx',
|
||||||
|
marginBottom: '60rpx',
|
||||||
|
}}
|
||||||
|
className='at-row at-row__align--start'
|
||||||
|
>
|
||||||
|
<View className='at-col at-col-1 at-col--auto'>
|
||||||
|
<Image
|
||||||
|
style='width: 240rpx; height: 240rpx; margin-left: 60rpx; margin-right: 30rpx; margin-top: 30rpx; border-radius: 120rpx'
|
||||||
|
src='https://wiki.zjueva.net/images/1/10/%E5%A4%B4%E5%83%8F.jpg?20240319171222'
|
||||||
|
mode='aspectFit'
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
className='at-article at-col at-col--wrap'
|
||||||
|
style={{ wordBreak: 'normal' }}
|
||||||
|
>
|
||||||
|
<View className='at-article__h1'>
|
||||||
|
{pt.get().aboutPage.dean.nickname}
|
||||||
|
</View>
|
||||||
|
<View className='at-article__h3'>
|
||||||
|
{pt.get().aboutPage.dean.username}
|
||||||
|
</View>
|
||||||
|
<View className='at-article__p'>
|
||||||
|
{pt.get().aboutPage.dean.status}
|
||||||
|
</View>
|
||||||
|
<View className='at-article__info'>
|
||||||
|
{pt.get().aboutPage.dean.note}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
style={{ marginTop: '100rpx', marginBottom: '60rpx' }}
|
||||||
|
className='at-row at-row__align--start'
|
||||||
|
>
|
||||||
|
<View className='at-col at-col-1 at-col--auto'>
|
||||||
|
<Image
|
||||||
|
style='width: 240rpx; height: 240rpx; margin-left: 60rpx; margin-right: 30rpx; margin-top: 30rpx; border-radius: 120rpx'
|
||||||
|
src='https://static.fracher21.top/head.jpg'
|
||||||
|
mode='aspectFit'
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
className='at-article at-col at-col--wrap'
|
||||||
|
style={{ wordBreak: 'normal' }}
|
||||||
|
>
|
||||||
|
<View className='at-article__h1'>
|
||||||
|
{pt.get().aboutPage.fracher.nickname}
|
||||||
|
</View>
|
||||||
|
<View className='at-article__h3'>
|
||||||
|
{pt.get().aboutPage.fracher.username}
|
||||||
|
</View>
|
||||||
|
<View className='at-article__p'>
|
||||||
|
{pt.get().aboutPage.fracher.status}
|
||||||
|
</View>
|
||||||
|
<View className='at-article__info'>
|
||||||
|
{pt.get().aboutPage.fracher.note}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View style={{ height: '200rpx' }}></View>
|
||||||
|
<PageFooter />
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +1,28 @@
|
|||||||
import { Component, ReactNode } from 'react';
|
import { Component, ReactNode } from 'react';
|
||||||
import { AtForm, AtInput, AtButton } from 'taro-ui';
|
import { AtForm, AtInput, AtButton, AtMessage } from 'taro-ui';
|
||||||
|
import { View } from '@tarojs/components';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import { updateUserInfo } from '@/service/userData';
|
||||||
|
import wechatUser from '@/wechat';
|
||||||
import './inform.scss';
|
import './inform.scss';
|
||||||
|
|
||||||
|
const submitInterval = 5000;
|
||||||
|
|
||||||
export default class InformPage extends Component {
|
export default class InformPage extends Component {
|
||||||
state = {
|
state = {
|
||||||
phone: '',
|
phone: wechatUser.getInfo().phone,
|
||||||
name: '',
|
name: wechatUser.getInfo().name,
|
||||||
|
isLoading: false,
|
||||||
|
isDisable: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
Taro.setNavigationBarTitle({
|
||||||
|
title: pt.get().navBar.user.inform,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
handleChangePhone(phone: string) {
|
handleChangePhone(phone: string) {
|
||||||
this.setState({
|
this.setState({
|
||||||
phone: phone,
|
phone: phone,
|
||||||
@@ -20,41 +36,66 @@ export default class InformPage extends Component {
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
console.log(this.state.name, this.state.phone);
|
|
||||||
}
|
|
||||||
onReset() {
|
|
||||||
this.setState({
|
this.setState({
|
||||||
phone: '',
|
isDisable: true,
|
||||||
name: '',
|
|
||||||
});
|
});
|
||||||
|
if (this.state.name == '' || this.state.phone == '') {
|
||||||
|
Taro.atMessage({
|
||||||
|
message: pt.get().button.submitText.blank,
|
||||||
|
type: 'error',
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
updateUserInfo(this);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
}
|
}
|
||||||
|
|
||||||
render(): ReactNode {
|
render(): ReactNode {
|
||||||
return (
|
return (
|
||||||
<AtForm
|
<View style={{ marginTop: '30rpx', width: '94%', marginLeft: '3%' }}>
|
||||||
onSubmit={this.onSubmit.bind(this)}
|
<AtForm onSubmit={this.onSubmit.bind(this)}>
|
||||||
onReset={this.onReset.bind(this)}
|
<AtMessage />
|
||||||
>
|
|
||||||
<AtInput
|
<AtInput
|
||||||
|
clear
|
||||||
|
required
|
||||||
name='phone'
|
name='phone'
|
||||||
title='手机号码'
|
title={pt.get().informPage.phoneText.title}
|
||||||
type='text'
|
type='number'
|
||||||
placeholder='便于查询工单'
|
placeholder={pt.get().informPage.phoneText.placeholder}
|
||||||
value={this.state.phone}
|
value={this.state.phone}
|
||||||
onChange={this.handleChangePhone.bind(this)}
|
onChange={this.handleChangePhone.bind(this)}
|
||||||
/>
|
/>
|
||||||
<AtInput
|
<AtInput
|
||||||
required
|
required
|
||||||
|
clear
|
||||||
name='name'
|
name='name'
|
||||||
title='真实姓名'
|
title={pt.get().informPage.nameText.title}
|
||||||
type='text'
|
type='text'
|
||||||
placeholder='必填,与工单绑定'
|
placeholder={pt.get().informPage.nameText.placeholder}
|
||||||
value={this.state.name}
|
value={this.state.name}
|
||||||
onChange={this.handleChangeName.bind(this)}
|
onChange={this.handleChangeName.bind(this)}
|
||||||
/>
|
/>
|
||||||
<AtButton formType='submit'>提交</AtButton>
|
<View style={{ marginTop: '30rpx' }}>
|
||||||
<AtButton formType='reset'>重置</AtButton>
|
<AtButton
|
||||||
|
loading={this.state.isLoading}
|
||||||
|
formType='submit'
|
||||||
|
type='primary'
|
||||||
|
disabled={this.state.isDisable}
|
||||||
|
>
|
||||||
|
{pt.get().button.buttonText.submit}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
</AtForm>
|
</AtForm>
|
||||||
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
usingComponents: {},
|
||||||
|
});
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import { AtButton, AtMessage } from 'taro-ui';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import { memberLogin, memberLogout } from '@/service/memberLogin';
|
||||||
|
import wechatUser from '@/wechat';
|
||||||
|
import { View } from '@tarojs/components';
|
||||||
|
import './member.scss';
|
||||||
|
|
||||||
|
const logInterval = 5000;
|
||||||
|
|
||||||
|
export default class UserMemberPage extends Component {
|
||||||
|
state = {
|
||||||
|
isLoading: false,
|
||||||
|
isDisable: false,
|
||||||
|
};
|
||||||
|
componentDidMount(): void {
|
||||||
|
Taro.setNavigationBarTitle({
|
||||||
|
title: pt.get().navBar.user.memberLogin,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onLogin() {
|
||||||
|
this.setState({
|
||||||
|
isDisable: true,
|
||||||
|
});
|
||||||
|
memberLogin(this);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, logInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
onLogout() {
|
||||||
|
this.setState({
|
||||||
|
isDisable: true,
|
||||||
|
});
|
||||||
|
memberLogout(this);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, logInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
render(): ReactNode {
|
||||||
|
return !wechatUser.getAccess() ? (
|
||||||
|
<View style={{ marginTop: '30rpx', width: '94%', marginLeft: '3%' }}>
|
||||||
|
<AtMessage />
|
||||||
|
<View className='page-title' style={{ marginBottom: '40rpx' }}>
|
||||||
|
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||||
|
{pt.get().memberPage.titleLine.main.login}
|
||||||
|
</View>
|
||||||
|
<View className='at-article__h2'>
|
||||||
|
{pt.get().memberPage.titleLine.sub.login}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<AtButton
|
||||||
|
loading={this.state.isLoading}
|
||||||
|
type='primary'
|
||||||
|
disabled={this.state.isDisable}
|
||||||
|
onClick={this.onLogin.bind(this)}
|
||||||
|
>
|
||||||
|
{pt.get().button.memberText.auth}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
|
<View style={{ marginTop: '30rpx', width: '94%', marginLeft: '3%' }}>
|
||||||
|
<AtMessage />
|
||||||
|
<View className='page-title' style={{ marginBottom: '40rpx' }}>
|
||||||
|
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||||
|
{pt.get().memberPage.titleLine.main.logout}
|
||||||
|
</View>
|
||||||
|
<View className='at-article__h2'>
|
||||||
|
{pt.get().memberPage.titleLine.sub.logout}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<AtButton type='primary' onClick={this.onLogout.bind(this)}>
|
||||||
|
{pt.get().button.buttonText.logout}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
usingComponents: {},
|
||||||
|
});
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import { View } from '@tarojs/components';
|
||||||
|
import { AtActivityIndicator, AtList, AtToast } from 'taro-ui';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import moment from 'moment';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import { RequestState } from '@/service';
|
||||||
|
import { getMyTicketList } from '@/service/myTicket';
|
||||||
|
import { TicketListItem } from '@/components/TicketListItem/TicketListItem';
|
||||||
|
import './myTicket.scss';
|
||||||
|
|
||||||
|
interface MyTicketState {
|
||||||
|
fixList: Array<TicketListItem>;
|
||||||
|
rs: RequestState;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class MyTicketPage extends Component<{}, MyTicketState> {
|
||||||
|
state = {
|
||||||
|
fixList: [new TicketListItem(0, '', '', 1, moment())],
|
||||||
|
rs: new RequestState(),
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
Taro.setNavigationBarTitle({
|
||||||
|
title: pt.get().navBar.user.myTicket,
|
||||||
|
});
|
||||||
|
getMyTicketList(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
render(): ReactNode {
|
||||||
|
if (this.state.rs.loading) {
|
||||||
|
return (
|
||||||
|
<AtActivityIndicator
|
||||||
|
mode='center'
|
||||||
|
content={pt.get().actIndicator.loading}
|
||||||
|
></AtActivityIndicator>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!this.state.rs.success) {
|
||||||
|
return (
|
||||||
|
<AtToast
|
||||||
|
isOpened
|
||||||
|
text={pt.get().toast.error}
|
||||||
|
icon='close-circle'
|
||||||
|
></AtToast>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
const fixListRenderer = this.state.fixList.map((item) => item.render());
|
||||||
|
return (
|
||||||
|
<View>
|
||||||
|
<AtList>{fixListRenderer}</AtList>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
usingComponents: {},
|
||||||
|
});
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
import { AtTextarea, AtButton, AtForm, AtMessage } from 'taro-ui';
|
||||||
|
import { Component, ReactNode } from 'react';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import pt from '@/plain-text';
|
||||||
|
import { reportMessage } from '@/service/report';
|
||||||
|
import { View } from '@tarojs/components';
|
||||||
|
import './report.scss';
|
||||||
|
|
||||||
|
const submitInterval = 5000;
|
||||||
|
|
||||||
|
export default class ReportPage extends Component {
|
||||||
|
state = {
|
||||||
|
report: '',
|
||||||
|
isLoading: false,
|
||||||
|
isDisable: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
Taro.setNavigationBarTitle({
|
||||||
|
title: pt.get().navBar.user.report,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChange(report: string) {
|
||||||
|
this.setState({
|
||||||
|
report,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
onSubmit() {
|
||||||
|
this.setState({
|
||||||
|
isDisable: true,
|
||||||
|
});
|
||||||
|
if (this.state.report == '') {
|
||||||
|
Taro.atMessage({
|
||||||
|
message: pt.get().button.submitText.blank,
|
||||||
|
type: 'error',
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
reportMessage(this);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setState({
|
||||||
|
isDisable: false,
|
||||||
|
});
|
||||||
|
}, submitInterval);
|
||||||
|
}
|
||||||
|
onReset() {
|
||||||
|
this.setState({
|
||||||
|
report: '',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
render(): ReactNode {
|
||||||
|
return (
|
||||||
|
<View style={{ marginTop: '30rpx', width: '94%', marginLeft: '3%' }}>
|
||||||
|
<AtForm
|
||||||
|
onSubmit={this.onSubmit.bind(this)}
|
||||||
|
onReset={this.onReset.bind(this)}
|
||||||
|
>
|
||||||
|
<AtMessage />
|
||||||
|
<AtTextarea
|
||||||
|
value={this.state.report}
|
||||||
|
height={400}
|
||||||
|
onChange={this.handleChange.bind(this)}
|
||||||
|
maxLength={200}
|
||||||
|
placeholder={pt.get().reportPage.placeHolderText}
|
||||||
|
/>
|
||||||
|
<View className='at-row'>
|
||||||
|
<View
|
||||||
|
className='at-col'
|
||||||
|
style={{
|
||||||
|
marginTop: '30rpx',
|
||||||
|
marginRight: '10rpx',
|
||||||
|
width: '50%',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<AtButton formType='reset' type='secondary'>
|
||||||
|
{pt.get().button.buttonText.reset}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
className='at-col'
|
||||||
|
style={{
|
||||||
|
marginTop: '30rpx',
|
||||||
|
marginLeft: '10rpx',
|
||||||
|
width: '50%',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<AtButton
|
||||||
|
loading={this.state.isLoading}
|
||||||
|
formType='submit'
|
||||||
|
type='primary'
|
||||||
|
disabled={this.state.isDisable}
|
||||||
|
>
|
||||||
|
{pt.get().button.buttonText.submit}
|
||||||
|
</AtButton>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</AtForm>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import { View } from '@tarojs/components';
|
|
||||||
import { Component, ReactNode } from 'react';
|
|
||||||
import Taro from '@tarojs/taro';
|
|
||||||
import './settings.scss';
|
|
||||||
|
|
||||||
export default class SettingsPage extends Component {
|
|
||||||
render(): ReactNode {
|
|
||||||
return <View></View>;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,33 @@
|
|||||||
import { View } from '@tarojs/components';
|
import { AtList, AtListItem, AtToast } from 'taro-ui';
|
||||||
import { Component, ReactNode } from 'react';
|
import { Component, ReactNode } from 'react';
|
||||||
|
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 aboutIcon from '@/assets/icons/UserPage/about.svg';
|
||||||
|
import userIcon from '@/assets/icons/UserPage/user.svg';
|
||||||
|
import clockIcon from '@/assets/icons/UserPage/clock.svg';
|
||||||
|
import messageIcon from '@/assets/icons/UserPage/message.svg';
|
||||||
|
import pt, { Lang } from '@/plain-text';
|
||||||
|
import { setLocaleData } from '@/service/localeData';
|
||||||
|
import wechatUser from '@/wechat';
|
||||||
import './user.scss';
|
import './user.scss';
|
||||||
import { AtList, AtListItem } from 'taro-ui';
|
|
||||||
|
const logo = 'https://wiki.zjueva.net/images/evalogo_hd.png';
|
||||||
|
const memberClickTimes = 7;
|
||||||
|
|
||||||
export default class UserPage extends Component {
|
export default class UserPage extends Component {
|
||||||
|
state = {
|
||||||
|
selector: ['简体中文', 'English'],
|
||||||
|
selectorChecked: {
|
||||||
|
zh_CN: '简体中文',
|
||||||
|
en_US: 'English',
|
||||||
|
}[pt.getCurLang()],
|
||||||
|
clicks: memberClickTimes,
|
||||||
|
isToastOpen: false,
|
||||||
|
toastText: '',
|
||||||
|
};
|
||||||
|
|
||||||
// 以下是TabBar相关
|
// 以下是TabBar相关
|
||||||
pageCtx = Taro.getCurrentInstance().page;
|
pageCtx = Taro.getCurrentInstance().page;
|
||||||
componentDidShow() {
|
componentDidShow() {
|
||||||
@@ -14,38 +36,146 @@ export default class UserPage extends Component {
|
|||||||
}
|
}
|
||||||
// 以上是TabBar相关
|
// 以上是TabBar相关
|
||||||
|
|
||||||
|
onTapImage = () => {
|
||||||
|
this.setState({
|
||||||
|
clicks: this.state.clicks - 1,
|
||||||
|
});
|
||||||
|
if (this.state.clicks < 3) {
|
||||||
|
this.setState({
|
||||||
|
toastText:
|
||||||
|
pt.get().userPage.memberEntry.prefix +
|
||||||
|
(this.state.clicks + 1).toString() + // React State's feature
|
||||||
|
pt.get().userPage.memberEntry.affix,
|
||||||
|
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',
|
||||||
|
};
|
||||||
|
|
||||||
|
onSelect = (e: { detail: { value: string | number } }) => {
|
||||||
|
this.setState({
|
||||||
|
selectorChecked: this.state.selector[e.detail.value],
|
||||||
|
});
|
||||||
|
let currentLang = this.showLangDict[this.state.selector[e.detail.value]];
|
||||||
|
pt.setLang(currentLang);
|
||||||
|
setLocaleData(currentLang);
|
||||||
|
Taro.reLaunch({
|
||||||
|
url: '/pages/user/user',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
myTicketPage() {
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: '/pages/user/myTicket/myTicket',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
informPage() {
|
informPage() {
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/user/inform/inform',
|
url: '/pages/user/inform/inform',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
settingsPage() {
|
reportPage() {
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/user/settings/settings',
|
url: '/pages/user/report/report',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
aboutPage() {
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: '/pages/user/about/about',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
render(): ReactNode {
|
render(): ReactNode {
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
|
<View
|
||||||
|
className='at-row at-row__justify--center at-row__align--end'
|
||||||
|
style='height:220rpx;'
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
onTap={this.onTapImage}
|
||||||
|
style='width: 200rpx;height: 200rpx;'
|
||||||
|
src={logo}
|
||||||
|
mode='aspectFit'
|
||||||
|
/>
|
||||||
|
</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:120rpx;color:#696969;'
|
||||||
|
>
|
||||||
|
<Text style={{ fontSize: '32rpx' }}> EVA Eta v1.1.0</Text>
|
||||||
|
</View>
|
||||||
<AtList>
|
<AtList>
|
||||||
<AtListItem
|
<AtListItem
|
||||||
title='我的信息'
|
title={pt.get().userPage.ticketColumn.title}
|
||||||
note='能帮助亦可更好地找到你哦!'
|
note={pt.get().userPage.ticketColumn.note}
|
||||||
arrow='right'
|
arrow='right'
|
||||||
iconInfo={{ size: 25, color: '#78A4FA', value: 'user' }}
|
thumb={clockIcon}
|
||||||
|
onClick={this.myTicketPage}
|
||||||
|
/>
|
||||||
|
{wechatUser.getAccess() ? (
|
||||||
|
<View></View>
|
||||||
|
) : (
|
||||||
|
<AtListItem
|
||||||
|
title={pt.get().userPage.infoColumn.title}
|
||||||
|
note={pt.get().userPage.infoColumn.note}
|
||||||
|
arrow='right'
|
||||||
|
thumb={userIcon}
|
||||||
onClick={this.informPage}
|
onClick={this.informPage}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<AtListItem
|
<AtListItem
|
||||||
title='设置'
|
title={pt.get().userPage.reportColumn.title}
|
||||||
note='配置小程序'
|
note={pt.get().userPage.reportColumn.note}
|
||||||
extraText=''
|
extraText=''
|
||||||
arrow='right'
|
arrow='right'
|
||||||
iconInfo={{ size: 25, color: '#FF4949', value: 'filter' }}
|
thumb={messageIcon}
|
||||||
onClick={this.settingsPage}
|
onClick={this.reportPage}
|
||||||
|
/>
|
||||||
|
<AtListItem
|
||||||
|
title={pt.get().userPage.aboutColumn.title}
|
||||||
|
note={pt.get().userPage.aboutColumn.note}
|
||||||
|
extraText=''
|
||||||
|
arrow='right'
|
||||||
|
thumb={aboutIcon}
|
||||||
|
onClick={this.aboutPage}
|
||||||
|
/>
|
||||||
|
<View style={{ height: '40rpx' }}></View>
|
||||||
|
<Picker
|
||||||
|
mode='selector'
|
||||||
|
range={this.state.selector}
|
||||||
|
onChange={this.onSelect}
|
||||||
|
>
|
||||||
|
<AtList>
|
||||||
|
<AtListItem
|
||||||
|
title='语言 / Language'
|
||||||
|
extraText={this.state.selectorChecked}
|
||||||
/>
|
/>
|
||||||
</AtList>
|
</AtList>
|
||||||
|
</Picker>
|
||||||
|
</AtList>
|
||||||
|
<PageFooter />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
export interface NotFoundText {
|
||||||
|
title: {
|
||||||
|
ZhCn: string;
|
||||||
|
EnUs: string;
|
||||||
|
};
|
||||||
|
desc: {
|
||||||
|
ZhCn: string;
|
||||||
|
EnUs: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export const notFound: NotFoundText = {
|
||||||
|
title: {
|
||||||
|
ZhCn: '啊哦...请求出错了...',
|
||||||
|
EnUs: 'Oops...Network Error...',
|
||||||
|
},
|
||||||
|
desc: {
|
||||||
|
ZhCn: '请确保处于校网环境后,点击右上角 "...-重新进入小程序"!',
|
||||||
|
EnUs: 'Please make sure you\'re in ZJU\'s school network environment and then click on the top right corner "... - re-enter the applet"!',
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
export interface AboutPageText {
|
||||||
|
dean: {
|
||||||
|
nickname: string;
|
||||||
|
username: string;
|
||||||
|
status: string;
|
||||||
|
note: string;
|
||||||
|
};
|
||||||
|
fracher: {
|
||||||
|
nickname: string;
|
||||||
|
username: string;
|
||||||
|
status: string;
|
||||||
|
note: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export const aboutPageZhCn: AboutPageText = {
|
||||||
|
dean: {
|
||||||
|
nickname: '晓洋',
|
||||||
|
username: '@ Dawn_Ocean',
|
||||||
|
status: 'Eta & Tea 总设计',
|
||||||
|
note: '摸鱼与开发叠加态',
|
||||||
|
},
|
||||||
|
fracher: {
|
||||||
|
nickname: '宇航员',
|
||||||
|
username: '@ FrozenArcher',
|
||||||
|
status: 'Ate 总设计, 项目合作贡献者',
|
||||||
|
note: 'React 真是太有意思了',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const aboutPageEnUs: AboutPageText = {
|
||||||
|
dean: {
|
||||||
|
nickname: 'Dean Ma',
|
||||||
|
username: '@ Dawn_Ocean',
|
||||||
|
status: "Eta & Tea's General Designer",
|
||||||
|
note: 'Struggling between developing & laziness',
|
||||||
|
},
|
||||||
|
fracher: {
|
||||||
|
nickname: 'Fracher',
|
||||||
|
username: '@ FrozenArcher',
|
||||||
|
status: "Ate's General Designer, Project's Contributor",
|
||||||
|
note: 'React is so fun',
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
export interface ActIndicatorText {
|
||||||
|
loading: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const actIndicatorZhCn: ActIndicatorText = {
|
||||||
|
loading: '加载中...',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const actIndicatorEnUs: ActIndicatorText = {
|
||||||
|
loading: 'Loading...',
|
||||||
|
};
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
export interface AskLeaveText {
|
||||||
|
modal: {
|
||||||
|
title: string;
|
||||||
|
content: string;
|
||||||
|
};
|
||||||
|
shift: {
|
||||||
|
title: string;
|
||||||
|
week: string[];
|
||||||
|
shift: string[];
|
||||||
|
};
|
||||||
|
reason: {
|
||||||
|
title: string;
|
||||||
|
placeHolder: string;
|
||||||
|
};
|
||||||
|
substitute: {
|
||||||
|
title: string;
|
||||||
|
placeHolder: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export const askLeaveZhCn: AskLeaveText = {
|
||||||
|
modal: {
|
||||||
|
title: '确认无代班?',
|
||||||
|
content: '值班人数少于 4 时须填写代班人员。请假记录将会被上传保存!',
|
||||||
|
},
|
||||||
|
shift: {
|
||||||
|
title: '值班时间',
|
||||||
|
week: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
|
||||||
|
shift: ['第一班', '第二班', '第三班'],
|
||||||
|
},
|
||||||
|
reason: {
|
||||||
|
title: '请假原因',
|
||||||
|
placeHolder: '请在此说明请假原因',
|
||||||
|
},
|
||||||
|
substitute: {
|
||||||
|
title: '替班人员',
|
||||||
|
placeHolder: '人数少于 4 时必填!',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const askLeaveEnUs: AskLeaveText = {
|
||||||
|
modal: {
|
||||||
|
title: 'Confirm no substitute?',
|
||||||
|
content:
|
||||||
|
'Must have substitute if members are less than 4! The ticket will be uploaded and saved!',
|
||||||
|
},
|
||||||
|
shift: {
|
||||||
|
title: 'Duty time',
|
||||||
|
week: ['Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.', 'Sun.'],
|
||||||
|
shift: ['1st Shift', '2nd Shift', '3rd Shift'],
|
||||||
|
},
|
||||||
|
reason: {
|
||||||
|
title: 'Reason',
|
||||||
|
placeHolder: 'Leave your reason for leaving here',
|
||||||
|
},
|
||||||
|
substitute: {
|
||||||
|
title: 'Substitute',
|
||||||
|
placeHolder: 'Must have if members are less than 4!',
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
export interface ButtonText {
|
||||||
|
buttonText: {
|
||||||
|
submit: string;
|
||||||
|
reset: string;
|
||||||
|
login: string;
|
||||||
|
logout: string;
|
||||||
|
};
|
||||||
|
submitText: {
|
||||||
|
success: string;
|
||||||
|
error: string;
|
||||||
|
blank: string;
|
||||||
|
};
|
||||||
|
memberText: {
|
||||||
|
auth: string;
|
||||||
|
};
|
||||||
|
indexText: {
|
||||||
|
conclusion: string;
|
||||||
|
askLeave: string;
|
||||||
|
};
|
||||||
|
loginText: {
|
||||||
|
success: string;
|
||||||
|
error: string;
|
||||||
|
fail: string;
|
||||||
|
};
|
||||||
|
logoutText: {
|
||||||
|
success: string;
|
||||||
|
error: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export const buttonZhCn: ButtonText = {
|
||||||
|
buttonText: {
|
||||||
|
submit: '提交',
|
||||||
|
reset: '清空',
|
||||||
|
login: '登录',
|
||||||
|
logout: '登出',
|
||||||
|
},
|
||||||
|
submitText: {
|
||||||
|
success: '提交成功',
|
||||||
|
error: '提交失败:',
|
||||||
|
blank: '请填写完整!',
|
||||||
|
},
|
||||||
|
memberText: {
|
||||||
|
auth: '协会统一身份认证登录',
|
||||||
|
},
|
||||||
|
indexText: {
|
||||||
|
conclusion: '提交值班总结',
|
||||||
|
askLeave: '我要请假',
|
||||||
|
},
|
||||||
|
loginText: {
|
||||||
|
success: '登录成功',
|
||||||
|
error: '登录失败',
|
||||||
|
fail: '请检查用户名或密码!',
|
||||||
|
},
|
||||||
|
logoutText: {
|
||||||
|
success: '登出成功',
|
||||||
|
error: '登出失败',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const buttonEnUs: ButtonText = {
|
||||||
|
buttonText: {
|
||||||
|
submit: 'Submit',
|
||||||
|
reset: 'Reset',
|
||||||
|
login: 'Login',
|
||||||
|
logout: 'Logout',
|
||||||
|
},
|
||||||
|
submitText: {
|
||||||
|
success: 'Success',
|
||||||
|
error: 'Error: ',
|
||||||
|
blank: 'Please fill in the blanks!',
|
||||||
|
},
|
||||||
|
memberText: {
|
||||||
|
auth: 'EVA Auth Login Entry',
|
||||||
|
},
|
||||||
|
indexText: {
|
||||||
|
conclusion: 'Submit Duty Conclusion',
|
||||||
|
askLeave: 'Ask for Leave',
|
||||||
|
},
|
||||||
|
loginText: {
|
||||||
|
success: 'Login Success',
|
||||||
|
error: 'Login Failed',
|
||||||
|
fail: 'Please check username or password!',
|
||||||
|
},
|
||||||
|
logoutText: {
|
||||||
|
success: 'Logout Success',
|
||||||
|
error: 'Logout Failed',
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
export interface ConclusionText {
|
||||||
|
title: string;
|
||||||
|
placeHolder: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const conclusionTextZhCn: ConclusionText = {
|
||||||
|
title: '值班总结',
|
||||||
|
placeHolder:
|
||||||
|
'请在此填写完整的值班情况,包括:几人请假;收到几台电脑;后续的处理情况;上一班交接的电脑情况;下一班对接的电脑情况;另外,请拍照记录值班桌整理情况',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const conclusionTextEnUs: ConclusionText = {
|
||||||
|
title: 'Duty Conclusion',
|
||||||
|
placeHolder:
|
||||||
|
'Please fill in the complete duty situation here, including: how many people were on leave; how many computers were received; how the follow-up was handled; how the computers were handed over by the previous shift; how the computers were docked by the next shift; Also, please take photos to document the organization of the duty desk',
|
||||||
|
};
|
||||||