🦀️ fix: 修复立减金已领取时 意外触发状态
This commit is contained in:
parent
f192da7712
commit
8be3fd19c8
15
alipay.html
15
alipay.html
|
@ -97,7 +97,7 @@
|
||||||
disabledBtn: false,
|
disabledBtn: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
async created () {
|
||||||
//唤起支付宝授权,打开领取
|
//唤起支付宝授权,打开领取
|
||||||
this.openId = this.getQueryString(
|
this.openId = this.getQueryString(
|
||||||
window.location.search,
|
window.location.search,
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
"orderNumber"
|
"orderNumber"
|
||||||
);
|
);
|
||||||
this.orderNumber = orderNumber;
|
this.orderNumber = orderNumber;
|
||||||
this.getOrderDetail(this.orderNumber);
|
await this.getOrderDetail(this.orderNumber);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getQueryString (path, name) {
|
getQueryString (path, name) {
|
||||||
|
@ -126,6 +126,7 @@
|
||||||
this.reduceInfo = res.data.rule;
|
this.reduceInfo = res.data.rule;
|
||||||
this.reduceInfo.status = res.data.status;
|
this.reduceInfo.status = res.data.status;
|
||||||
this.couponInfo = res.data;
|
this.couponInfo = res.data;
|
||||||
|
sessionStorage.setItem('bm_auth', JSON.stringify(res.data));
|
||||||
if (isNext) {
|
if (isNext) {
|
||||||
window.location.href = './advise.html';
|
window.location.href = './advise.html';
|
||||||
sessionStorage.setItem('messageTip', message);
|
sessionStorage.setItem('messageTip', message);
|
||||||
|
@ -171,22 +172,22 @@
|
||||||
statusFn (val) {
|
statusFn (val) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case 0:
|
case 0:
|
||||||
return buttonTextFun(this.couponInfo, 'receive');
|
return buttonTextFun(2, 'receive');
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
return buttonTextFun(this.couponInfo, 'receive');
|
return buttonTextFun(2, 'receive');
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
return buttonTextFun(this.couponInfo, 'received');
|
return buttonTextFun(2, 'received');
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
return buttonTextFun(this.couponInfo, 'receive');
|
return buttonTextFun(2, 'receive');
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
return '已过期';
|
return '已过期';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return buttonTextFun(this.couponInfo, 'receive');
|
return buttonTextFun(2, 'receive');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
disabledBtn: false,
|
disabledBtn: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
async created () {
|
||||||
//唤起支付宝授权,打开领取
|
//唤起支付宝授权,打开领取
|
||||||
this.openId = this.getQueryString(
|
this.openId = this.getQueryString(
|
||||||
window.location.search,
|
window.location.search,
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
"orderNumber"
|
"orderNumber"
|
||||||
);
|
);
|
||||||
this.orderNumber = orderNumber;
|
this.orderNumber = orderNumber;
|
||||||
this.getOrderDetail(this.orderNumber);
|
await this.getOrderDetail(this.orderNumber);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getQueryString (path, name) {
|
getQueryString (path, name) {
|
||||||
|
@ -132,6 +132,7 @@
|
||||||
this.reduceInfo = res.data.rule;
|
this.reduceInfo = res.data.rule;
|
||||||
this.reduceInfo.status = res.data.status;
|
this.reduceInfo.status = res.data.status;
|
||||||
this.couponInfo = res.data;
|
this.couponInfo = res.data;
|
||||||
|
sessionStorage.setItem('bm_auth', JSON.stringify(res.data));
|
||||||
if (isNext) {
|
if (isNext) {
|
||||||
window.location.href = './advise.html';
|
window.location.href = './advise.html';
|
||||||
sessionStorage.setItem('messageTip', message);
|
sessionStorage.setItem('messageTip', message);
|
||||||
|
@ -183,22 +184,22 @@
|
||||||
statusFn (val) {
|
statusFn (val) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case 0:
|
case 0:
|
||||||
return buttonTextFun(this.couponInfo, 'receive');
|
return buttonTextFun(2, 'receive');
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
return buttonTextFun(this.couponInfo, 'receive');
|
return buttonTextFun(2, 'receive');
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
return buttonTextFun(this.couponInfo, 'received');
|
return buttonTextFun(2, 'received');
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
return buttonTextFun(this.couponInfo, 'receive');
|
return buttonTextFun(2, 'receive');
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
return '已过期';
|
return '已过期';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return buttonTextFun(this.couponInfo, 'receive');
|
return buttonTextFun(2, 'receive');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,6 +180,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
/* 立即领取 */
|
/* 立即领取 */
|
||||||
submit () {
|
submit () {
|
||||||
|
if (this.ysf.available != 1) return;
|
||||||
if (phoneReg.test(this.account) && this.confirmAccount) {
|
if (phoneReg.test(this.account) && this.confirmAccount) {
|
||||||
if (this.account === this.confirmAccount) {
|
if (this.account === this.confirmAccount) {
|
||||||
this.finalSubmit();
|
this.finalSubmit();
|
||||||
|
@ -207,8 +208,6 @@
|
||||||
/* 创建订单 */
|
/* 创建订单 */
|
||||||
req.axiosPost("/key/usage", data)
|
req.axiosPost("/key/usage", data)
|
||||||
.then(({ code, data, message }) => {
|
.then(({ code, data, message }) => {
|
||||||
|
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
// 使用结算 6
|
// 使用结算 6
|
||||||
|
|
|
@ -142,6 +142,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
/* 立即领取 */
|
/* 立即领取 */
|
||||||
submit () {
|
submit () {
|
||||||
|
if (this.ysf.available != 1) return;
|
||||||
if (phoneReg.test(this.account) && this.confirmAccount) {
|
if (phoneReg.test(this.account) && this.confirmAccount) {
|
||||||
if (this.account === this.confirmAccount) {
|
if (this.account === this.confirmAccount) {
|
||||||
this.finalSubmit();
|
this.finalSubmit();
|
||||||
|
|
|
@ -184,6 +184,7 @@
|
||||||
submit () {
|
submit () {
|
||||||
const { confirm, receive_account } = this.form;
|
const { confirm, receive_account } = this.form;
|
||||||
if (this.loading) return;
|
if (this.loading) return;
|
||||||
|
if (this.goods.available != 1) return;
|
||||||
if (confirm !== receive_account) return this.tips('支付宝账号不一致');
|
if (confirm !== receive_account) return this.tips('支付宝账号不一致');
|
||||||
if ((phoneReg.test(receive_account) || emailReg.test(receive_account))) {
|
if ((phoneReg.test(receive_account) || emailReg.test(receive_account))) {
|
||||||
this.finalSubmit();
|
this.finalSubmit();
|
||||||
|
|
|
@ -176,6 +176,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
/* 立即领取 */
|
/* 立即领取 */
|
||||||
submit () {
|
submit () {
|
||||||
|
if (this.ysf.available != 1) return;
|
||||||
if (phoneReg.test(this.account) && this.confirmAccount) {
|
if (phoneReg.test(this.account) && this.confirmAccount) {
|
||||||
if (this.account === this.confirmAccount) {
|
if (this.account === this.confirmAccount) {
|
||||||
this.finalSubmit();
|
this.finalSubmit();
|
||||||
|
|
1
ysf.html
1
ysf.html
|
@ -135,6 +135,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
/* 立即领取 */
|
/* 立即领取 */
|
||||||
submit () {
|
submit () {
|
||||||
|
if (this.ysf.available != 1) return;
|
||||||
if (phoneReg.test(this.account) && this.confirmAccount) {
|
if (phoneReg.test(this.account) && this.confirmAccount) {
|
||||||
if (this.account === this.confirmAccount) {
|
if (this.account === this.confirmAccount) {
|
||||||
this.finalSubmit();
|
this.finalSubmit();
|
||||||
|
|
|
@ -179,6 +179,7 @@
|
||||||
submit () {
|
submit () {
|
||||||
const { confirm, receive_account } = this.form;
|
const { confirm, receive_account } = this.form;
|
||||||
if (this.loading) return;
|
if (this.loading) return;
|
||||||
|
if (this.goods.available != 1) return;
|
||||||
if (confirm !== receive_account) return this.tips('支付宝账号不一致');
|
if (confirm !== receive_account) return this.tips('支付宝账号不一致');
|
||||||
if ((phoneReg.test(receive_account) || emailReg.test(receive_account))) {
|
if ((phoneReg.test(receive_account) || emailReg.test(receive_account))) {
|
||||||
this.finalSubmit();
|
this.finalSubmit();
|
||||||
|
|
Loading…
Reference in New Issue