fix:券后价为0的,点击立即支付直接创建订单,不需要到微信或支付宝进行支付

This commit is contained in:
Apple 2022-10-18 16:09:44 +08:00
parent d74fd5c71d
commit 5d94b9c6ba
1 changed files with 6 additions and 6 deletions

View File

@ -510,7 +510,11 @@
this.payType = payType
this.show = false
let orderInfo = await this.createdOrder(payType);
if (orderInfo.pay_status==2) {//pay_status 2已支付
window.location.replace('http://test.86885.cn/paysuccess.html?order_number=' + orderInfo.order_number);
}else{
this.createdPay(orderInfo.order_number);
}
},
//创建优惠券订单
createdOrder (payType) {
@ -543,11 +547,7 @@
createdPay (orderNumber) {
req.axiosGet('/key/coupon/createPay/' + orderNumber).then(res => {
if (res.code == 200) {
if (res.data.pay_status) {//pay_status 2已支付
window.location.replace('http://test.86885.cn/paysuccess.html?order_number=' + res.data.order_number);
} else {
this.payWayRun(res.data);
}
} else {
this.openErrorDialog(res.message);
}