fix: wrong api & services
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user