bugfix:未登录循环注册

This commit is contained in:
2026-09-13 01:08:11 +08:00
parent 0a8d60d87f
commit f897e1a391
12 changed files with 268 additions and 38 deletions
+3 -2
View File
@@ -8,11 +8,12 @@ App<IAppOption>({
},
onLaunch() {
// 登录失效 / 账号禁用时统一清登录态并跳转登录页
// 登录失效 / 账号禁用时统一清登录态。
// 跳转登录页由 request.ts 的 redirectToLogin 单一入口负责(幂等去重),
// 避免多个请求同时 401 时并发 reLaunch 打断 webview 路由。
setAuthExpiredHandler(() => {
auth.clearTokens()
auth.clearUserInfo()
wx.reLaunch({ url: '/pages/login/login' })
})
},
})