合入家庭共享与设备消息能力
This commit is contained in:
@@ -10,6 +10,12 @@ export default function Login() {
|
||||
|
||||
useEffect(() => {
|
||||
if (getToken()) {
|
||||
const redirectUrl = String(Taro.getStorageSync('postLoginRedirect') || '').trim()
|
||||
if (redirectUrl) {
|
||||
Taro.removeStorageSync('postLoginRedirect')
|
||||
Taro.reLaunch({ url: redirectUrl })
|
||||
return
|
||||
}
|
||||
Taro.reLaunch({ url: '/pages/device/index' })
|
||||
return
|
||||
}
|
||||
@@ -64,6 +70,12 @@ export default function Login() {
|
||||
|
||||
Taro.showToast({ title: '登录成功', icon: 'success' })
|
||||
setTimeout(() => {
|
||||
const redirectUrl = String(Taro.getStorageSync('postLoginRedirect') || '').trim()
|
||||
if (redirectUrl) {
|
||||
Taro.removeStorageSync('postLoginRedirect')
|
||||
Taro.reLaunch({ url: redirectUrl })
|
||||
return
|
||||
}
|
||||
Taro.reLaunch({ url: '/pages/device/index' })
|
||||
}, 300)
|
||||
} catch (error: any) {
|
||||
|
||||
Reference in New Issue
Block a user