chore:去登录按钮和上面登录注册一样跳转

This commit is contained in:
2026-08-06 09:39:22 +08:00
parent 1fb2b470da
commit b46dc248d5

View File

@@ -960,20 +960,13 @@ onShareClick() {
this.$nextTick(() => this.loadCode(false));
},
/** 点击未登录卡片 → 弹出登录 */
/** 点击未登录卡片 → 跳转登录页(和页面顶部"点击登录"一致) */
goLogin() {
const isPage = getCurrentPages().length > 0;
if (this.$refs && this.$refs.nsLoginBox) {
try {
if (typeof this.$refs.nsLoginBox.showLoginBox === 'function') {
this.$refs.nsLoginBox.showLoginBox();
return;
}
} catch (e) {}
}
uni.navigateTo && uni.navigateTo({
url: '/pages/login/login',
fail: () => { uni.redirectTo && uni.redirectTo({ url: '/pages/login/login' }); }
uni.navigateTo({
url: '/pages_tool/login/login',
fail: () => {
uni.redirectTo({ url: '/pages_tool/login/login' });
}
});
}
}