diff --git a/src/components/global.vue b/src/components/global.vue index b8c3dc8..d1ca9a1 100644 --- a/src/components/global.vue +++ b/src/components/global.vue @@ -182,7 +182,7 @@ if (this.DYZshow) { setTimeout(() => { bdGetTransactionStatus({ code: code }).then(res => { - // console.log('bdGetTransactionStatus',res) + console.log('bdGetTransactionStatus',res) if(res.status=='COMPLETE'||res.status=='CANCELED') { // 已完成,已取消 this.DYZshow = false @@ -194,17 +194,17 @@ }else{ if(res.status=='IN_PROGRESS') { // 进行中 - if(!this.Progress.rate) { + if(!this.Progress.rate&&res.rate&&res.rate!=0) { this.Progress.rate = res.rate - if (res.rate == '99%') { - setTimeout(() => { - if (this.Progress.rate == '99%') { - this.Progress.rate = '100%' - } - }, 500) - } + // if (res.rate == '99%') { + // setTimeout(() => { + // if (this.Progress.rate == '99%') { + // this.Progress.rate = '100%' + // } + // }, 500) + // } } - }else if(res=='ABNORMAL'){ + }else if(res.status=='ABNORMAL'){ // 订单异常 if (!this.cite.ztyc) { this.numZt = 120 @@ -272,13 +272,19 @@ getTransactionStatus({ code: code }).then(res => { // 已完成,已取消,订单异常 // console.log('3秒查询订单状态',res) - if(res=='COMPLETE'||res=='CANCELED'||res=='ABNORMAL') { + if(res=='COMPLETE'||res=='CANCELED') { this.DYZshow = false this.DYZlist = [] this.DYZlistNum = 1 this.$router.push({ name: 'complete' }) + }else if(res=='ABNORMAL') { + if (!this.cite.ztyc) { + this.numZt = 120 + this.onNum() + } + this.cite.ztyc = true }else{ this.ddcx(code) }