修复已知bug

This commit is contained in:
zhouyanli
2026-07-21 09:41:54 +08:00
parent 7b1864f439
commit e68579a5d3
15 changed files with 1143 additions and 839 deletions

View File

@@ -17,19 +17,20 @@
getPushCID()
// #endif
// 自动登录:检查本地是否已有 token有则直接跳转首页
// 首页已是入口页:已登录用户不做跳转,直接留首页
// 仅对未登录用户按需跳转到引导页或登录页
const token = uni.getStorageSync('token')
const hasShowGuide = uni.getStorageSync('hasShowGuide')
if (token) {
// 已有登录凭证,直接进入首
console.log('检测到已登录,跳转页')
uni.reLaunch({ url: '/pages/index/index' })
} else if (hasShowGuide) {
// 已看过引导页但没有 token直接跳转登录页
if (!token && !hasShowGuide) {
// 首次使用:跳转引导
console.log('首次启动,跳转引导页')
uni.reLaunch({ url: '/pages/navigation/navigation' })
} else if (!token && hasShowGuide) {
// 已看过引导但未登录:跳转登录页
console.log('已看过引导页,跳转登录页')
uni.reLaunch({ url: '/pageSubPack/loginSub/pwd-login' })
}
// 否则停留在引导页navigation
// 有 token已在首页不做跳转
})
onShow(() =>{
console.log('App Show')