黑名单校验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) // console.log(this.userInfo.papersnumber)
if (this.userInfo) { if (this.userInfo) {
// console.log(this.userInfo.papersnumber); // console.log(this.userInfo.papersnumber);
this.$toast.loading({
message: '请求中',
duration: 0,
})
if (this.GlobalConfig.appMode) { 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(); 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 { else {
checkBacklist(this.userInfo.papersnumber).then(res => { try {
if (res.data) { checkBacklist(this.userInfo.papersnumber).then(res => {
this.errMsg = res.data; this.$toast.clear();
this.isShowError = true; if (res.data) {
} else { this.errMsg = res.data;
this.$router.push({ name: 'guidance', query: { deptId: id } }) this.isShowError = true;
} } else {
}) this.$router.push({ name: 'guidance', query: { deptId: id } })
}
}, err => {
this.$toast.clear();
})
} catch (error) {
this.$toast.clear();
}
} }
} }
}, },

Loading…
Cancel
Save