fix: wrong api & services
parent
b68e3db0a3
commit
3313307e84
11
doc/api.md
11
doc/api.md
|
|
@ -502,4 +502,15 @@ Request
|
|||
"token": "token_test",
|
||||
"conclusion": "周四第三班,一人请假,共收两台电脑,均劝退已取回。由上一班交接两台电脑,其中一台维修成功已取回,一台仍在维修。"
|
||||
}
|
||||
```
|
||||
|
||||
### 修改值班人数 `POST /member/dutycnt`
|
||||
|
||||
Request
|
||||
|
||||
```json
|
||||
{
|
||||
"token": "token_test",
|
||||
"dutycnt": 5,
|
||||
}
|
||||
```
|
||||
|
|
@ -149,4 +149,7 @@ export default {
|
|||
id: 514,
|
||||
},
|
||||
},
|
||||
'POST /member/dutycnt': {
|
||||
success: true,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import pt from '@/plain-text';
|
|||
import wechatUser from '@/wechat';
|
||||
import { getUrl } from '.';
|
||||
|
||||
const reLaunchInterval = 1000;
|
||||
|
||||
export function askLeave(that: AskLeavePage) {
|
||||
that.setState({
|
||||
isLoading: true,
|
||||
|
|
@ -13,8 +15,8 @@ export function askLeave(that: AskLeavePage) {
|
|||
method: 'POST',
|
||||
data: {
|
||||
token: wechatUser.getToken(),
|
||||
week: that.state.range[0][that.state.shift[0]],
|
||||
shift: that.state.range[1][that.state.shift[1]],
|
||||
week: (that.state.shift[0] + 1).toString(),
|
||||
shift: (that.state.shift[1] + 1).toString(),
|
||||
reason: that.state.reason,
|
||||
substitute: that.state.substitute,
|
||||
},
|
||||
|
|
@ -28,6 +30,11 @@ export function askLeave(that: AskLeavePage) {
|
|||
message: pt.get().button.submitText.success,
|
||||
type: 'success',
|
||||
});
|
||||
setTimeout(() => {
|
||||
Taro.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
});
|
||||
}, reLaunchInterval);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err.errMsg);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export function changeDutyCnt(that: MainPage) {
|
|||
isLoading: true,
|
||||
});
|
||||
Taro.request({
|
||||
url: getUrl('/tickets/addtooreo'),
|
||||
url: getUrl('/member/dutycnt'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
token: wechatUser.getToken(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue