fix: 统一登录跳转逻辑,添加redirectTo参数避免页面栈溢出

1. 为所有登录跳转调用添加redirectTo跳转类型参数
2. 调整部分页面的onShow生命周期执行顺序和定时器包装
3. 补充缺失的ns-login组件引用到两个diy组件中
4. 修复部分页面登录后返回出现循环跳转的问题
This commit is contained in:
2026-06-27 15:08:01 +08:00
parent 95194585d2
commit aee630b546
36 changed files with 81 additions and 75 deletions

View File

@@ -260,7 +260,7 @@ export default {
// 加入购物车
joinCart() {
if (!this.storeToken && this.preview == 0) {
this.$refs.login.open(this.shareUrl);
this.$refs.login.open(this.shareUrl, 'redirectTo');
return;
}
if (this.goodsSkuDetail.is_virtual == 1) {
@@ -276,7 +276,7 @@ export default {
// 立即购买
buyNow() {
if (!this.storeToken && this.preview == 0) {
this.$refs.login.open(this.shareUrl);
this.$refs.login.open(this.shareUrl, 'redirectTo');
return;
}
this.$refs.goodsSku.show("buy_now", () => {
@@ -352,7 +352,7 @@ export default {
},
});
} else {
this.$refs.login.open(this.shareUrl);
this.$refs.login.open(this.shareUrl, 'redirectTo');
this.couponBtnSwitch = false;
}
},