修复bug

This commit is contained in:
zhouyanli
2026-08-01 11:56:28 +08:00
parent a34b625092
commit f74fb33e11
30 changed files with 162 additions and 257 deletions

View File

@@ -80,11 +80,8 @@ const tokenSave = uni.getStorageSync('token')
const needRedirect = hasShowGuide || tokenSave
if (needRedirect) {
if (tokenSave) {
uni.reLaunch({ url: '/pages/index/index' })
} else if (hasShowGuide) {
uni.reLaunch({ url: '/pageSubPack/loginSub/login?mode=pwd' })
}
// 已登录或已看过引导页:直接进首页
uni.reLaunch({ url: '/pages/index/index' })
}
// ========== 响应式数据 ==========
@@ -122,17 +119,10 @@ const handleBtnClick = () => {
isNavigating.value = true;
// 记录引导已完成
uni.setStorageSync('hasShowGuide', true);
// 检查是否已有登录 token有则直接进首页,否则跳转登录页
const token = uni.getStorageSync('token');
if (token) {
uni.switchTab({
url: '/pages/index/index'
})
} else {
uni.navigateTo({
url: "/pageSubPack/loginSub/login?mode=pwd"
})
}
// 直接进首页(未登录用户可正常浏览首页,需登录的功能由点击拦截处理)
uni.switchTab({
url: '/pages/index/index'
})
}
};
</script>