黑名单校验loading

main
xuechunyuan 3 years ago
parent 6bceddf8ac
commit 12ce08f5a5
  1. 53
      src/views/HomeView.vue

@ -119,29 +119,44 @@ export default {
// console.log(this.userInfo.papersnumber)
if (this.userInfo) {
// console.log(this.userInfo.papersnumber);
this.$toast.loading({
message: '请求中',
duration: 0,
})
if (this.GlobalConfig.appMode) {
vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdyhhmdyz", JSON.stringify({ cupCardNo: this.userInfo.papersnumber }), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => {
try {
vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdyhhmdyz", JSON.stringify({ cupCardNo: this.userInfo.papersnumber }), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => {
this.$toast.clear();
let retData = JSON.parse(value);
if (retData.code == 200 && retData.data) {
this.errMsg = retData.data;
this.isShowError = true;
} else {
this.$router.push({ name: 'guidance', query: { deptId: id } })
}
}, err => {
this.$toast.clear();
})
} catch (error) {
this.$toast.clear();
let retData = JSON.parse(value);
if (retData.code == 200 && retData.data) {
this.errMsg = retData.data;
this.isShowError = true;
} else {
this.$router.push({ name: 'guidance', query: { deptId: id } })
}
}, err => {
this.$toast.clear();
})
}
}
else {
checkBacklist(this.userInfo.papersnumber).then(res => {
if (res.data) {
this.errMsg = res.data;
this.isShowError = true;
} else {
this.$router.push({ name: 'guidance', query: { deptId: id } })
}
})
try {
checkBacklist(this.userInfo.papersnumber).then(res => {
this.$toast.clear();
if (res.data) {
this.errMsg = res.data;
this.isShowError = true;
} else {
this.$router.push({ name: 'guidance', query: { deptId: id } })
}
}, err => {
this.$toast.clear();
})
} catch (error) {
this.$toast.clear();
}
}
}
},

Loading…
Cancel
Save