更新加载中的异常处理

This commit is contained in:
weipengfei 2023-08-07 18:29:14 +08:00
parent e76fac7bca
commit 4cb8f15274
2 changed files with 52 additions and 42 deletions

View File

@ -119,27 +119,32 @@
},
//
async addContract(data) {
uni.showLoading({
title:'合同发送中',
mask: true
})
let res = await Draftingcontracts({
id: this.id
});
this.initCompany();
if (this.userInfo.contract.check_status == 3) {
this.timerCount = 60;
this.timer = setInterval(() => {
this.timerCount--;
if (this.timerCount == 0) {
clearInterval(this.timer);
this.initCompany();
}
}, 1000);
try{
uni.showLoading({
title:'合同发送中',
mask: true
})
let res = await Draftingcontracts({
id: this.id
});
this.initCompany();
if (this.userInfo.contract.check_status == 3) {
this.timerCount = 60;
this.timer = setInterval(() => {
this.timerCount--;
if (this.timerCount == 0) {
clearInterval(this.timer);
this.initCompany();
}
}, 1000);
}
uni.hideLoading();
Toast('合同已发送');
this.naviTo('/subpkg/submit/submit');
}catch(e){
uni.hideLoading();
Toast('发送失败');
}
uni.hideLoading();
Toast('合同已发送');
this.naviTo('/subpkg/submit/submit');
},
//
async getPostsms() {

View File

@ -299,33 +299,38 @@
contract_type: data.contract_type,
type: data.type
})
// Toast('');
this.loadUserDetail();
uni.hideLoading();
Toast('合同已生成');
},
//
async addContract(data) {
uni.showLoading({
title:'合同发送中',
mask: true
})
let res = await userDraftingcontracts({
id: this.userInfo.id
});
// Toast('');
this.loadUserDetail();
if (this.userInfo.contract.check_status == 3) {
this.timerCount = 60;
this.timer = setInterval(() => {
this.timerCount--;
if (this.timerCount == 0) {
clearInterval(this.timer);
this.loadUserDetail();
}
}, 1000);
}
uni.hideLoading();
this.naviTo('/subpkg/submit/submit');
try{
uni.showLoading({
title:'合同发送中',
mask: true
})
let res = await userDraftingcontracts({
id: this.userInfo.id
});
this.loadUserDetail();
if (this.userInfo.contract.check_status == 3) {
this.timerCount = 60;
this.timer = setInterval(() => {
this.timerCount--;
if (this.timerCount == 0) {
clearInterval(this.timer);
this.loadUserDetail();
}
}, 1000);
}
uni.hideLoading();
Toast('合同已发送');
this.naviTo('/subpkg/submit/submit');
}catch(e){
uni.hideLoading();
Toast('合同发送失败');
}
},
//
async getPostsms() {