From 96664dd390563f6b32d51c894ddabdba0ce0f931 Mon Sep 17 00:00:00 2001 From: zhangds Date: Fri, 23 Feb 2024 17:36:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E5=8C=85=E7=A0=81?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/index.html b/index.html index fefdd5f..6c6a9a9 100644 --- a/index.html +++ b/index.html @@ -167,18 +167,20 @@ // 判断是否是包码逻辑 if (res.data.settlement_data) { self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data }); + } else { + this.openDialog('正在加载商品...'); + localStorage.setItem('entryLink', window.location.href);//存储起始页链接 + let clr = setTimeout(() => { + if (this.pageType === 4 || this.pageType === 8) { + window.location.replace('/coupon/couponCollection.html'); + } else { + window.location.replace('/homepage.html'); + } + clearTimeout(clr); + }, 1000); } - this.openDialog('正在加载商品...'); - localStorage.setItem('entryLink', window.location.href);//存储起始页链接 - let clr = setTimeout(() => { - if (this.pageType === 4 || this.pageType === 8) { - window.location.replace('/coupon/couponCollection.html'); - } else { - window.location.replace('/homepage.html'); - } - clearTimeout(clr); - }, 1000); + } else { self.openErrorDialog(res.message); } @@ -314,16 +316,16 @@ //self.testGoToPack(res.data.token); // 只用测试!!!!!!!!! if (res.data.settlement_data) { self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data }); + } else { + setTimeout(() => { + if (this.pageType === 4 || this.pageType === 8) { + window.location.href = './coupon/couponCollection.html'; + } else { + window.location.href = './homepage.html'; + } + }, 1000); } - // 存储 - setTimeout(() => { - if (this.pageType === 4 || this.pageType === 8) { - window.location.href = './coupon/couponCollection.html'; - } else { - window.location.href = './homepage.html'; - } - }, 1000); } else { self.openErrorDialog(res.message); }