From bdccdfd674c3d5c6624a5dd7169e53c825f1ccb0 Mon Sep 17 00:00:00 2001 From: zhangds Date: Thu, 22 Feb 2024 19:48:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8C=85=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- orderDetails/chargerOrder.html | 12 +++++++----- packkey/goods-exchange.html | 8 ++++---- packkey/goods-index.html | 8 ++++---- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index d0c3210..54017d1 100644 --- a/index.html +++ b/index.html @@ -224,7 +224,7 @@ // 第一步:判断是否为包码 if (data.settlement_data.settlement_type > 0) { // 存储数据 - localStorage.setItem("bm_auth", JSON.stringify(data)); + sessionStorage.setItem("bm_auth", JSON.stringify(data)); // 跳转包码页面 window.location.href = './packkey/goods-index.html'; return diff --git a/orderDetails/chargerOrder.html b/orderDetails/chargerOrder.html index 2334b2b..7b85fdb 100644 --- a/orderDetails/chargerOrder.html +++ b/orderDetails/chargerOrder.html @@ -70,7 +70,7 @@ const { createApp, ref, onMounted, computed } = Vue; createApp({ - setup () { + setup() { const goods = ref({}); const toast = ref(false); const clr = ref(null); @@ -82,8 +82,10 @@ }); /* 获取详情 */ - function getInfo () { + function getInfo() { const orderNumber = sessionStorage.getItem('orderNumber'); + console.log("orderNumber =>", orderNumber) + return req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => { if (res.code == 200) { const { product_name, update_time, status, show_url, account, create_time, use_coupon } = res.data; @@ -93,7 +95,7 @@ } /* 重新兑换 */ - function toHome () { + function toHome() { if (goods.value.use_coupon === 2) { window.location.replace('../homepage.html'); } else { @@ -103,7 +105,7 @@ /* 复制 */ - function copyFunction (number) { + function copyFunction(number) { var aux = document.createElement("input"); aux.setAttribute("value", number); document.body.appendChild(aux); @@ -132,7 +134,7 @@ } }); - function backHandler () { + function backHandler() { history.go(-1); } diff --git a/packkey/goods-exchange.html b/packkey/goods-exchange.html index 330218a..6453592 100644 --- a/packkey/goods-exchange.html +++ b/packkey/goods-exchange.html @@ -97,7 +97,7 @@