bugfix:未登录循环注册
This commit is contained in:
+3
-2
@@ -8,11 +8,12 @@ App<IAppOption>({
|
||||
},
|
||||
|
||||
onLaunch() {
|
||||
// 登录失效 / 账号禁用时统一清登录态并跳转登录页
|
||||
// 登录失效 / 账号禁用时统一清登录态。
|
||||
// 跳转登录页由 request.ts 的 redirectToLogin 单一入口负责(幂等去重),
|
||||
// 避免多个请求同时 401 时并发 reLaunch 打断 webview 路由。
|
||||
setAuthExpiredHandler(() => {
|
||||
auth.clearTokens()
|
||||
auth.clearUserInfo()
|
||||
wx.reLaunch({ url: '/pages/login/login' })
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user