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();