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,18 +167,20 @@
// 判断是否是包码逻辑 // 判断是否是包码逻辑
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('正在加载商品...');
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 { } else {
self.openErrorDialog(res.message); self.openErrorDialog(res.message);
} }
@ -314,16 +316,16 @@
//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(() => {
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 { } else {
self.openErrorDialog(res.message); self.openErrorDialog(res.message);
} }