🦀️ fix: 修复立减金已领取时 意外触发状态

This commit is contained in:
wangsongsole 2024-04-22 15:51:24 +08:00
parent f192da7712
commit 8be3fd19c8
8 changed files with 22 additions and 16 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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

View File

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

View File

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

View File

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

View File

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

View File

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