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); }