diff --git a/alipay.html b/alipay.html
index 8789e6a..1cd6221 100644
--- a/alipay.html
+++ b/alipay.html
@@ -117,13 +117,17 @@
return null;
},
//获取订单详情
- getOrderDetail (id) {
+ getOrderDetail (id, isNext = false, message = '') {
req.axiosGet('/voucher/info', {
order_number: id
}).then(res => {
this.reduceInfo = res.data.rule;
this.reduceInfo.status = res.data.status;
this.couponInfo = res.data;
+ if (isNext) {
+ window.location.href = './advise.html';
+ sessionStorage.setItem('messageTip', message);
+ }
}).catch();
},
toReceive () {
@@ -143,14 +147,8 @@
setTimeout(() => {
this.disabledBtn = false;
}, 2000);
- if (res.code == 200) {
- window.location.href = './advise.html';
- this.getOrderDetail();
- sessionStorage.setItem('messageTip', '');
- } else {
- window.location.href = './advise.html';
- sessionStorage.setItem('messageTip', res.message);
- }
+ const text = res.code == 200 ? '' : res.message;
+ this.getOrderDetail(this.orderNumber, true, text);
})
.catch((err) => { });
},
@@ -173,13 +171,13 @@
return '立即领取';
break;
case 1:
- return '充值中';
+ return '立即领取';
break;
case 2:
- return '已完成';
+ return '已领取';
break;
case 3:
- return '充值失败';
+ return '立即领取';
break;
case 5:
return '已过期';