From da0daecd7abc57db48e2303de8d1e85f8e2ba197 Mon Sep 17 00:00:00 2001 From: woody Date: Sat, 12 Jul 2025 15:54:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(pay):=20=20=E6=B3=A8=E5=86=8C=E5=8D=95?= =?UTF-8?q?=E4=BC=9A=E5=91=98=E6=9F=A5=E8=AF=A2=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/pay/index.vue | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) 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 => {