fix: 增加包码,链接模式

This commit is contained in:
zhangds 2024-02-25 14:37:56 +08:00
parent 60bf3ad202
commit a00c6744bd
1 changed files with 14 additions and 9 deletions

View File

@ -164,17 +164,22 @@
localStorage.setItem('token', res.data.token); localStorage.setItem('token', res.data.token);
localStorage.setItem('haskey', keyCode); localStorage.setItem('haskey', keyCode);
// 判断是否是包码逻辑
this.openDialog('正在加载商品...'); this.openDialog('正在加载商品...');
localStorage.setItem('entryLink', window.location.href);//存储起始页链接 localStorage.setItem('entryLink', window.location.href);//存储起始页链接
let clr = setTimeout(() => {
if (this.pageType === 4 || this.pageType === 8) { /** TODO: 判断是否是包码逻辑 **/
window.location.replace('/coupon/couponCollection.html'); if (res.data.settlement_data && res.data.settlement_data.settlement_type > 0) {
} else { self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data });
window.location.replace('/homepage.html'); } else {
} let clr = setTimeout(() => {
clearTimeout(clr); if (this.pageType === 4 || this.pageType === 8) {
}, 1000); 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);