diff --git a/coupon/myOrder.html b/coupon/myOrder.html
index 229b548..f0f89fb 100644
--- a/coupon/myOrder.html
+++ b/coupon/myOrder.html
@@ -235,7 +235,7 @@
/* 去支付 */
payFunction ({ payType }) {
/* payType 1:微信 2:支付宝 */
- /* 后端 微信是5 */
+ /* 后端 微信是5 支付宝是1 */
this.active = payType === 2 ? 1 : 5
this.show = false
@@ -250,16 +250,16 @@
if (code === 200) {
this.getOrderList()
- this.payRealFunction()
+ this.payRealFunction(payType)
}
})
} else {
- this.payRealFunction()
+ this.payRealFunction(payType)
}
},
/* 调用支付 */
- payRealFunction () {
+ payRealFunction (payType) {
req.axiosGet(`/key/coupon/createPay/${this.activeOrder.order_number}`, { token: localStorage.getItem('token') }).then(({ code, data, message }) => {
if (code === 403) {
this.popFunction({ title: '温馨提示', text: message, status: 2, b_text: '我知道了', show: true })
@@ -268,8 +268,11 @@
}
/* 跳转链接 */
- if (code === 200) {
+ /* 支付宝支付 */
+ if (code === 200 && payType === 2) {
window.location.href = data
+ } else { /* 微信支付 */
+
}
})
},