fix(login): 登录成功跳转失败时恢复按钮可重试

This commit is contained in:
ozh 2026-09-15 13:54:45 +08:00
parent 90e6262c89
commit f81d80f8ec
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ export default function Login() {
try {
const { code, userInfo } = await performWxLogin()
dispatch(setAuth({ token: code, userInfo }))
reLaunch(ROUTES.HOME)
await reLaunch(ROUTES.HOME)
} catch (e) {
// code 失效/已用等场景:toast 后端 Message,用户重按按钮重新 Taro.login(code 一次性,重试安全)
toast.error(e instanceof Error && e.message ? e.message : '登录失败')