BUG优化

dev
xiepeng 2024-05-17 09:21:41 +08:00
parent b73c4da3c5
commit c7cd69ad26
1 changed files with 2 additions and 35 deletions

View File

@ -112,7 +112,7 @@
this.loginUserId = loginUser.USER_ID;
this.background = require('@/common/background.json');
await this.getFunc();
this.fnInit();
this.getData();
// setTimeout(function() {
// that.loading = true
// }, 500)
@ -140,7 +140,7 @@
_this.list1 = [];
await this.getFunc();
}
this.fnInit()
this.getData();
},
methods: {
@ -158,39 +158,6 @@
this.list = [];
this.list1 = [];
this.getData()
},
async fnInit() {
uni.request({
url: basePath + '/app/offduty/isRest',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
USER_NAME: loginUser.NAME,
CORPINFO_ID: loginUser.CORPINFO_ID,
USER_ID: loginUser.USER_ID,
},
success: (res) => {
console.log(res)
if("0" == res.data.ISREST){
this.getData();
}else{
uni.showModal({
title: "温馨提示",
confirmText: "确定",
content:
"重要提醒:您当前处于离岗状态,无法操作。",
success: (res) => {
if (res.cancel || res.confirm) {
uni.navigateBack();
}
},
});
}
}
})
},
getData(){
var _this=this;