From 4488da1536e23554d9d083ef1a96157010a24e6a Mon Sep 17 00:00:00 2001 From: zhangds Date: Wed, 28 Feb 2024 16:11:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=99=BD=E5=90=8D?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 21 ++++++++++++++------- packkey/exchange.html | 1 - 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 841187b..9f8808e 100644 --- a/index.html +++ b/index.html @@ -364,14 +364,21 @@ localStorage.setItem('getTokenList', JSON.stringify(getTokenList)); this.openDialog('正在加载商品...'); localStorage.setItem('entryLink', window.location.href);//存储起始页链接 - setTimeout(() => { - if (this.pageType === 4 || this.pageType === 8) { - window.location.href = './coupon/couponCollection.html'; - } else { - window.location.href = './homepage.html'; - } - }, 1000); + /** TODO: 判断是否是包码逻辑 **/ + if (res.data.settlement_data && res.data.settlement_data.settlement_type > 0) { + setTimeout(() => { + self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data }); + }, 1000); + } else { + setTimeout(() => { + if (this.pageType === 4 || this.pageType === 8) { + window.location.href = './coupon/couponCollection.html'; + } else { + window.location.href = './homepage.html'; + } + }, 1000); + } } else { self.openErrorDialog(self.tiptext); } diff --git a/packkey/exchange.html b/packkey/exchange.html index 76c388b..09a7822 100644 --- a/packkey/exchange.html +++ b/packkey/exchange.html @@ -342,7 +342,6 @@ }; self.popboxshow = false; req.axiosPost('/key/usage', data).then(res => { - debugger // 使用结算 6 // 卡密做特殊处理,复制才会触发 if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 6 && self.goodInfo.product_type !== 2) {