合入家庭共享与设备消息能力

This commit is contained in:
stu2not
2026-05-26 17:12:51 +08:00
parent 555a2ddc16
commit 050bc17f79
40 changed files with 3072 additions and 165 deletions

View File

@@ -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) {