fix(app): 恢复启动时自动跳过登录页逻辑
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
9960a17cac
commit
dc5010350c
+8
-8
@@ -6,13 +6,13 @@ App<IAppOption>({
|
||||
|
||||
onLaunch() {
|
||||
// 已登录则跳过登录页
|
||||
// const userInfo = wx.getStorageSync('userInfo')
|
||||
// if (userInfo) {
|
||||
// const connectDeviceInfo = wx.getStorageSync('connectDeviceInfo')
|
||||
// const hasDevice = connectDeviceInfo && Object.keys(connectDeviceInfo).length > 0
|
||||
// wx.reLaunch({
|
||||
// url: hasDevice ? '/pages/home/home' : '/pages/connectedDevice/connectedDevice'
|
||||
// })
|
||||
// }
|
||||
const userInfo = wx.getStorageSync('userInfo')
|
||||
if (userInfo) {
|
||||
const connectDeviceInfo = wx.getStorageSync('connectDeviceInfo')
|
||||
const hasDevice = connectDeviceInfo && Object.keys(connectDeviceInfo).length > 0
|
||||
wx.reLaunch({
|
||||
url: hasDevice ? '/pages/home/home' : '/pages/connectedDevice/connectedDevice'
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user