diff --git a/coupon/details.html b/coupon/details.html index e6c8c7a..b310179 100644 --- a/coupon/details.html +++ b/coupon/details.html @@ -52,20 +52,22 @@

{{goodInfo.product_name}}

-

账号:

-

再次输入:

-

账号:

-

再次输入:

+
@@ -156,9 +158,14 @@ {{(goodsDetail.origin_price-goodsDetail.coupon_price).toFixed(2)}}

- + @@ -435,7 +442,7 @@ //兑换商品 exchangeGoodsFn () { - if (this.goodsDetail.type === 1) { /* 兑换码 */ + if (this.goodsDetail.type === 1 && this.goodInfo.product_type === 1) { /* 兑换码 */ if (goodsDetail.available != 1) { this.openErrorDialog(product_status(goodsDetail.available, goodsDetail)); return @@ -533,8 +540,8 @@ this.payType = payType this.show = false let orderInfo = await this.createdOrder(payType); - if (orderInfo.pay_status == 2||[1,2].includes(orderInfo.channel)) {//pay_status 2已支付 channel 1 支付宝 2微信 - let orderNumber=orderInfo.pay_status == 2?orderInfo.order_number:orderInfo.original_order_number; + if (orderInfo.pay_status == 2 || [1, 2].includes(orderInfo.channel)) {//pay_status 2已支付 channel 1 支付宝 2微信 + let orderNumber = orderInfo.pay_status == 2 ? orderInfo.order_number : orderInfo.original_order_number; window.location.replace('http://test.86885.cn/paysuccess.html?order_number=' + orderNumber); } else { this.createdPay(orderInfo.order_number); @@ -549,9 +556,9 @@ "key": localStorage.getItem('key'), "code_batch_id": this.goodsDetail.code_batch_id, "goods_id": this.goodInfo.goods_id, - "account": this.account, + "account": this.account || '888888', /* 卡密时默认账号 */ "pay_type": payType == 2 ? 1 : 5, - "pay_amount":this.goodsDetail.coupon_price + "pay_amount": this.goodsDetail.coupon_price } return new Promise((resolve, reject) => { req.axiosPost('/key/createCouponOrder', data).then(res => { @@ -571,7 +578,7 @@ //优惠券订单支付 createdPay (orderNumber) { - req.axiosGet('/key/coupon/createPay/' + orderNumber,{token:localStorage.getItem('token')}).then(res => { + req.axiosGet('/key/coupon/createPay/' + orderNumber, { token: localStorage.getItem('token') }).then(res => { if (res.code == 200) { this.payWayRun(res.data); } else {