From 152dcafbd0b512dcbf489ad4dc923fc4619fa3f5 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Sun, 4 Feb 2024 15:48:33 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=80=EF=B8=8F=20fix:=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exchange.html | 3 +-- orderDetails/cardOrder.html | 17 +++++++++++++---- orderDetails/chargerOrder.html | 18 ++++++++++++++---- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/exchange.html b/exchange.html index a24e7ff..334181c 100644 --- a/exchange.html +++ b/exchange.html @@ -73,8 +73,7 @@
-
+

订单

diff --git a/orderDetails/cardOrder.html b/orderDetails/cardOrder.html index 07ad19a..295bf9e 100644 --- a/orderDetails/cardOrder.html +++ b/orderDetails/cardOrder.html @@ -51,7 +51,7 @@
-
+
重新兑换
@@ -84,12 +84,21 @@ const orderNumber = sessionStorage.getItem('orderNumber'); req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => { if (res.code == 200) { - const { product_name, status, show_url, card_number, card_password } = res.data; - goods.value = { product_name, time: res.data.goods.end_time, status, show_url, card_number, card_password, card_show: res.data.goods.card_show }; + const { product_name, status, show_url, card_number, card_password, use_coupon } = res.data; + goods.value = { product_name, time: res.data.goods.end_time, status, show_url, card_number, card_password, card_show: res.data.goods.card_show, use_coupon }; } }); } + /* 重新兑换 */ + function toHome () { + if (goods.value.use_coupon === 2) { + window.location.replace('../homepage.html'); + } else { + window.location.replace('../coupon/couponCollection.html'); + } + } + /* 复制 */ function copyFunction (number) { var aux = document.createElement("input"); @@ -124,7 +133,7 @@ history.go(-1); } - return { copyFunction, getInfo, backHandler, dynamicBanner, goods, toast, goodsCount }; + return { copyFunction, getInfo, backHandler, toHome, dynamicBanner, goods, toast, goodsCount }; } }).mount('#app') diff --git a/orderDetails/chargerOrder.html b/orderDetails/chargerOrder.html index 669335d..5870e2d 100644 --- a/orderDetails/chargerOrder.html +++ b/orderDetails/chargerOrder.html @@ -52,7 +52,7 @@ -
+
重新兑换
@@ -86,12 +86,22 @@ const orderNumber = sessionStorage.getItem('orderNumber'); req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => { if (res.code == 200) { - const { product_name, update_time, status, show_url, account, create_time } = res.data; - goods.value = { product_name, update_time, status, show_url, account, create_time, orderNumber }; + const { product_name, update_time, status, show_url, account, create_time, use_coupon } = res.data; + goods.value = { product_name, update_time, status, show_url, account, create_time, orderNumber, use_coupon }; } }); } + /* 重新兑换 */ + function toHome () { + if (goods.value.use_coupon === 2) { + window.location.replace('../homepage.html'); + } else { + window.location.replace('../coupon/couponCollection.html'); + } + } + + /* 复制 */ function copyFunction (number) { var aux = document.createElement("input"); @@ -126,7 +136,7 @@ history.go(-1); } - return { copyFunction, getInfo, backHandler, dynamicBanner, goods, toast, goodsCount }; + return { copyFunction, getInfo, backHandler, toHome, dynamicBanner, goods, toast, goodsCount }; } }).mount('#app')