diff --git a/pages/pay/index.vue b/pages/pay/index.vue index 60889ec..218ee8d 100644 --- a/pages/pay/index.vue +++ b/pages/pay/index.vue @@ -709,7 +709,8 @@ import { REPURCHASE_AREA, REISSUE_AREA, } from '@/util/specialAreaMap' -var payStatus +let payStatus +let registerFlag = null export default { components: { successDialog, @@ -784,6 +785,10 @@ export default { this.isQuickSelected = false }, }, + onUnload() { + clearInterval(payStatus) + clearInterval(this?.clockTime) + }, async onLoad(options) { this.paramsPost = JSON.parse(options.paramsPost) // 获取支付配置 @@ -1461,18 +1466,17 @@ export default { if (that.sucPay == 1) { // 清除定时器 clearInterval(payStatus) - if ( - [REGIEST_AREA.id, UPGRADE_AREA.id].includes( - Number(this.specialArea) - ) - ) { - api.registerInfo(this.orderCode).then(res => { - this.$refs.successDialog.showSuccess(res.data) - }) - } else { - this.wxPopup = false - this.aliQrCodeVisible = false - this.showSucce = true + this.wxPopup = false + this.aliQrCodeVisible = false + this.showSucce = true + if ([REGIEST_AREA.id].includes(Number(this.specialArea))) { + registerFlag = setTimeout(() => { + api.registerInfo(this.orderCode).then(res => { + if (res.data) { + this?.$refs?.successDialog?.showSuccess(res.data) + } + }) + }, 3000) } } else { api.payStatus(data).then(res => {