@@ -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')