fix: 优化包码判断逻辑

This commit is contained in:
zhangds 2024-02-23 17:36:15 +08:00
parent 7d38d87166
commit 96664dd390
1 changed files with 20 additions and 18 deletions

View File

@ -167,8 +167,7 @@
// 判断是否是包码逻辑 // 判断是否是包码逻辑
if (res.data.settlement_data) { if (res.data.settlement_data) {
self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data }); self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data });
} } else {
this.openDialog('正在加载商品...'); this.openDialog('正在加载商品...');
localStorage.setItem('entryLink', window.location.href);//存储起始页链接 localStorage.setItem('entryLink', window.location.href);//存储起始页链接
let clr = setTimeout(() => { let clr = setTimeout(() => {
@ -179,6 +178,9 @@
} }
clearTimeout(clr); clearTimeout(clr);
}, 1000); }, 1000);
}
} else { } else {
self.openErrorDialog(res.message); self.openErrorDialog(res.message);
} }
@ -314,9 +316,7 @@
//self.testGoToPack(res.data.token); // 只用测试!!!!!!!!! //self.testGoToPack(res.data.token); // 只用测试!!!!!!!!!
if (res.data.settlement_data) { if (res.data.settlement_data) {
self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data }); self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data });
} } else {
// 存储
setTimeout(() => { setTimeout(() => {
if (this.pageType === 4 || this.pageType === 8) { if (this.pageType === 4 || this.pageType === 8) {
window.location.href = './coupon/couponCollection.html'; window.location.href = './coupon/couponCollection.html';
@ -324,6 +324,8 @@
window.location.href = './homepage.html'; window.location.href = './homepage.html';
} }
}, 1000); }, 1000);
}
} else { } else {
self.openErrorDialog(res.message); self.openErrorDialog(res.message);
} }