fix: api.md & mock

mgy
Dawn1Ocean 2024-04-19 14:24:04 +08:00
parent 19a1c407f2
commit 9bf2ef67be
2 changed files with 38 additions and 53 deletions

View File

@ -52,15 +52,36 @@ data:
} }
``` ```
### 当前值班信息 `GET /admin/duty/current` ## 主席团页面
#### 正常值班 ### 值班信息管理
#### 当前值班信息 `GET /admin/duty/current`
##### 正常值班
data: data:
```json ```json
{ {
"isNormalDuty": true, "isNormalDuty": true, // 判断是否是正常值班时间
"currentDuty": "1", // 判断是否正在值班 / 值哪一班 "1" | "2" | "3" => 正在值班,"off" => 值班下班
"inDutyCnt": 3,
"otherDutyTime": "", // 正常值班时为空
"offDutyReason": "",
"place": "204",
"dutyRecoverTime": ""
}
```
##### 其他值班
data:
```json
{
"isNormalDuty": false, // 判断是否是正常值班时间
"currentDuty": "others", // 判断是否正在值班 / 值哪一班 "others" => 正在值班,"off" => 值班下班
"inDutyCnt": 3, "inDutyCnt": 3,
"otherDutyTime": "", "otherDutyTime": "",
"offDutyReason": "", "offDutyReason": "",
@ -69,24 +90,24 @@ data:
} }
``` ```
#### 其他值班 #### 更新当前值班情况 `POST /admin/duty/update`
data: 无关项返回空字符串,后端手动校验
request:
```json ```json
{ {
"isInDuty": true, "isNormalDuty": false,
"currentDuty": "2", "currentDuty": "2",
"inDutyCnt": 3, "inDutyCnt": 3,
"otherDutyTime": "", "otherDutyTime": "",
"offDutyReason": "", "offDutyReason": "",
"place": "204", "place": "204",
"dutyRecoverTime": "" "dutyRecoverTime": "",
} },
``` ```
## 主席团页面
### 值班表管理 ### 值班表管理
#### 更新值班表 `POST /admin/sheet/create` #### 更新值班表 `POST /admin/sheet/create`
@ -200,45 +221,9 @@ data:
} }
``` ```
### 特殊值班 ### 反馈管理
#### 获取当前值班情况 `GET /admin/duty/current` #### 获取反馈列表 `GET /admin/reportlist`
data:
```json
{
"isInDuty": true,
"currentDuty": "2",
"inDutyCnt": 3,
"otherDutyTime": "",
"offDutyReason": "",
"place": "",
"dutyRecoverTime": "",
},
```
#### 更新当前值班情况 `POST /admin/duty/update`
无关项返回空字符串,后端手动校验
request:
```json
{
"isInDuty": true,
"currentDuty": "2",
"inDutyCnt": 3,
"otherDutyTime": "",
"offDutyReason": "",
"place": "204",
"dutyRecoverTime": "",
},
```
## 反馈页面
### 获取反馈列表 `GET /admin/reportlist`
request: request:
@ -270,9 +255,9 @@ data:
} }
``` ```
## 日志页面 ### 日志页面
### 获取日志列表 `GET /admin/loglist` #### 获取日志列表 `GET /admin/loglist`
request: request:
@ -316,9 +301,9 @@ data:
前端显示的信息:"{op} 于 {time} {operation} 了 {target}{prev.info} -> {curr.info}" 前端显示的信息:"{op} 于 {time} {operation} 了 {target}{prev.info} -> {curr.info}"
## 值班总结管理页面 ### 值班总结管理页面
### 获取值班总结列表 `GET /admin/conclusionlist` #### 获取值班总结列表 `GET /admin/conclusionlist`
request: request:

View File

@ -35,7 +35,7 @@ module.exports = {
'GET /admin/duty/current': { 'GET /admin/duty/current': {
success: true, success: true,
data: { data: {
isInDuty: true, isNormalDuty: true,
currentDuty: '2', currentDuty: '2',
inDutyCnt: 3, inDutyCnt: 3,
otherDutyTime: '', otherDutyTime: '',