From 8be3fd19c85a541adef498c9cf294ca17c6ea0b2 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Mon, 22 Apr 2024 15:51:24 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=80=EF=B8=8F=20fix:=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E7=AB=8B=E5=87=8F=E9=87=91=E5=B7=B2=E9=A2=86=E5=8F=96?= =?UTF-8?q?=E6=97=B6=20=E6=84=8F=E5=A4=96=E8=A7=A6=E5=8F=91=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alipay.html | 15 ++++++++------- packkey/alipay.html | 15 ++++++++------- packkey/ysf-reduce.html | 3 +-- packkey/ysf.html | 1 + packkey/zfb-reduce.html | 1 + ysf-reduce.html | 1 + ysf.html | 1 + zfb-reduce.html | 1 + 8 files changed, 22 insertions(+), 16 deletions(-) diff --git a/alipay.html b/alipay.html index 548bb8e..4375a38 100644 --- a/alipay.html +++ b/alipay.html @@ -97,7 +97,7 @@ disabledBtn: false, }; }, - created () { + async created () { //唤起支付宝授权,打开领取 this.openId = this.getQueryString( window.location.search, @@ -108,7 +108,7 @@ "orderNumber" ); this.orderNumber = orderNumber; - this.getOrderDetail(this.orderNumber); + await this.getOrderDetail(this.orderNumber); }, methods: { getQueryString (path, name) { @@ -126,6 +126,7 @@ this.reduceInfo = res.data.rule; this.reduceInfo.status = res.data.status; this.couponInfo = res.data; + sessionStorage.setItem('bm_auth', JSON.stringify(res.data)); if (isNext) { window.location.href = './advise.html'; sessionStorage.setItem('messageTip', message); @@ -171,22 +172,22 @@ statusFn (val) { switch (val) { case 0: - return buttonTextFun(this.couponInfo, 'receive'); + return buttonTextFun(2, 'receive'); break; case 1: - return buttonTextFun(this.couponInfo, 'receive'); + return buttonTextFun(2, 'receive'); break; case 2: - return buttonTextFun(this.couponInfo, 'received'); + return buttonTextFun(2, 'received'); break; case 3: - return buttonTextFun(this.couponInfo, 'receive'); + return buttonTextFun(2, 'receive'); break; case 5: return '已过期'; break; default: - return buttonTextFun(this.couponInfo, 'receive'); + return buttonTextFun(2, 'receive'); break; } } diff --git a/packkey/alipay.html b/packkey/alipay.html index 60fee35..cff197f 100644 --- a/packkey/alipay.html +++ b/packkey/alipay.html @@ -103,7 +103,7 @@ disabledBtn: false, }; }, - created () { + async created () { //唤起支付宝授权,打开领取 this.openId = this.getQueryString( window.location.search, @@ -114,7 +114,7 @@ "orderNumber" ); this.orderNumber = orderNumber; - this.getOrderDetail(this.orderNumber); + await this.getOrderDetail(this.orderNumber); }, methods: { getQueryString (path, name) { @@ -132,6 +132,7 @@ this.reduceInfo = res.data.rule; this.reduceInfo.status = res.data.status; this.couponInfo = res.data; + sessionStorage.setItem('bm_auth', JSON.stringify(res.data)); if (isNext) { window.location.href = './advise.html'; sessionStorage.setItem('messageTip', message); @@ -183,22 +184,22 @@ statusFn (val) { switch (val) { case 0: - return buttonTextFun(this.couponInfo, 'receive'); + return buttonTextFun(2, 'receive'); break; case 1: - return buttonTextFun(this.couponInfo, 'receive'); + return buttonTextFun(2, 'receive'); break; case 2: - return buttonTextFun(this.couponInfo, 'received'); + return buttonTextFun(2, 'received'); break; case 3: - return buttonTextFun(this.couponInfo, 'receive'); + return buttonTextFun(2, 'receive'); break; case 5: return '已过期'; break; default: - return buttonTextFun(this.couponInfo, 'receive'); + return buttonTextFun(2, 'receive'); break; } } diff --git a/packkey/ysf-reduce.html b/packkey/ysf-reduce.html index 4a16910..5444ed1 100644 --- a/packkey/ysf-reduce.html +++ b/packkey/ysf-reduce.html @@ -180,6 +180,7 @@ methods: { /* 立即领取 */ submit () { + if (this.ysf.available != 1) return; if (phoneReg.test(this.account) && this.confirmAccount) { if (this.account === this.confirmAccount) { this.finalSubmit(); @@ -207,8 +208,6 @@ /* 创建订单 */ req.axiosPost("/key/usage", data) .then(({ code, data, message }) => { - - this.loading = false; if (code == 200) { // 使用结算 6 diff --git a/packkey/ysf.html b/packkey/ysf.html index 74cf7d5..3eb8cdc 100644 --- a/packkey/ysf.html +++ b/packkey/ysf.html @@ -142,6 +142,7 @@ methods: { /* 立即领取 */ submit () { + if (this.ysf.available != 1) return; if (phoneReg.test(this.account) && this.confirmAccount) { if (this.account === this.confirmAccount) { this.finalSubmit(); diff --git a/packkey/zfb-reduce.html b/packkey/zfb-reduce.html index aec5a55..b6a1199 100644 --- a/packkey/zfb-reduce.html +++ b/packkey/zfb-reduce.html @@ -184,6 +184,7 @@ submit () { const { confirm, receive_account } = this.form; if (this.loading) return; + if (this.goods.available != 1) return; if (confirm !== receive_account) return this.tips('支付宝账号不一致'); if ((phoneReg.test(receive_account) || emailReg.test(receive_account))) { this.finalSubmit(); diff --git a/ysf-reduce.html b/ysf-reduce.html index a753012..ac4570e 100644 --- a/ysf-reduce.html +++ b/ysf-reduce.html @@ -176,6 +176,7 @@ methods: { /* 立即领取 */ submit () { + if (this.ysf.available != 1) return; if (phoneReg.test(this.account) && this.confirmAccount) { if (this.account === this.confirmAccount) { this.finalSubmit(); diff --git a/ysf.html b/ysf.html index 71fbcc3..99f7a27 100644 --- a/ysf.html +++ b/ysf.html @@ -135,6 +135,7 @@ methods: { /* 立即领取 */ submit () { + if (this.ysf.available != 1) return; if (phoneReg.test(this.account) && this.confirmAccount) { if (this.account === this.confirmAccount) { this.finalSubmit(); diff --git a/zfb-reduce.html b/zfb-reduce.html index 604c2c0..0636f8f 100644 --- a/zfb-reduce.html +++ b/zfb-reduce.html @@ -179,6 +179,7 @@ submit () { const { confirm, receive_account } = this.form; if (this.loading) return; + if (this.goods.available != 1) return; if (confirm !== receive_account) return this.tips('支付宝账号不一致'); if ((phoneReg.test(receive_account) || emailReg.test(receive_account))) { this.finalSubmit();