fix: api.md & mock
parent
19a1c407f2
commit
9bf2ef67be
89
doc/api.md
89
doc/api.md
|
|
@ -52,15 +52,36 @@ data:
|
|||
}
|
||||
```
|
||||
|
||||
### 当前值班信息 `GET /admin/duty/current`
|
||||
## 主席团页面
|
||||
|
||||
#### 正常值班
|
||||
### 值班信息管理
|
||||
|
||||
#### 当前值班信息 `GET /admin/duty/current`
|
||||
|
||||
##### 正常值班
|
||||
|
||||
data:
|
||||
|
||||
```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,
|
||||
"otherDutyTime": "",
|
||||
"offDutyReason": "",
|
||||
|
|
@ -69,24 +90,24 @@ data:
|
|||
}
|
||||
```
|
||||
|
||||
#### 其他值班
|
||||
#### 更新当前值班情况 `POST /admin/duty/update`
|
||||
|
||||
data:
|
||||
无关项返回空字符串,后端手动校验
|
||||
|
||||
request:
|
||||
|
||||
```json
|
||||
{
|
||||
"isInDuty": true,
|
||||
"isNormalDuty": false,
|
||||
"currentDuty": "2",
|
||||
"inDutyCnt": 3,
|
||||
"otherDutyTime": "",
|
||||
"offDutyReason": "",
|
||||
"place": "204",
|
||||
"dutyRecoverTime": ""
|
||||
}
|
||||
"dutyRecoverTime": "",
|
||||
},
|
||||
```
|
||||
|
||||
## 主席团页面
|
||||
|
||||
### 值班表管理
|
||||
|
||||
#### 更新值班表 `POST /admin/sheet/create`
|
||||
|
|
@ -200,45 +221,9 @@ data:
|
|||
}
|
||||
```
|
||||
|
||||
### 特殊值班
|
||||
### 反馈管理
|
||||
|
||||
#### 获取当前值班情况 `GET /admin/duty/current`
|
||||
|
||||
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`
|
||||
#### 获取反馈列表 `GET /admin/reportlist`
|
||||
|
||||
request:
|
||||
|
||||
|
|
@ -270,9 +255,9 @@ data:
|
|||
}
|
||||
```
|
||||
|
||||
## 日志页面
|
||||
### 日志页面
|
||||
|
||||
### 获取日志列表 `GET /admin/loglist`
|
||||
#### 获取日志列表 `GET /admin/loglist`
|
||||
|
||||
request:
|
||||
|
||||
|
|
@ -316,9 +301,9 @@ data:
|
|||
|
||||
前端显示的信息:"{op} 于 {time} {operation} 了 {target}:{prev.info} -> {curr.info}"
|
||||
|
||||
## 值班总结管理页面
|
||||
### 值班总结管理页面
|
||||
|
||||
### 获取值班总结列表 `GET /admin/conclusionlist`
|
||||
#### 获取值班总结列表 `GET /admin/conclusionlist`
|
||||
|
||||
request:
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ module.exports = {
|
|||
'GET /admin/duty/current': {
|
||||
success: true,
|
||||
data: {
|
||||
isInDuty: true,
|
||||
isNormalDuty: true,
|
||||
currentDuty: '2',
|
||||
inDutyCnt: 3,
|
||||
otherDutyTime: '',
|
||||
|
|
|
|||
Loading…
Reference in New Issue