From 7578db7ac1288243262b334d0765a6bf43448a16 Mon Sep 17 00:00:00 2001
From: wangsongsole
Date: Fri, 28 Oct 2022 11:28:30 +0800
Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=96=B0=E5=A2=9E=E5=8D=A1?=
=?UTF-8?q?=E5=AF=86=E5=95=86=E5=93=81=E7=B1=BB=E5=9E=8B=E6=94=AF=E4=BB=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
coupon/details.html | 53 +++++++++++++++++++++++++--------------------
1 file changed, 30 insertions(+), 23 deletions(-)
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}}
- 账号:focusFn(e)">
- 再次输入: focusFn(e)">
- 账号: focusFn(e)">
- 再次输入:focusFn(e)">
+
+ 账号:focusFn(e)">
+ 再次输入: focusFn(e)">
+ 账号: focusFn(e)">
+ 再次输入:focusFn(e)">
+
@@ -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 {