fix(mini-user): persist bind-phone session and stop login bounce
CI / verify (pull_request) Has been cancelled
CI / verify (pull_request) Has been cancelled
Phone bind discarded the new JWT after account merge, so the next page 401'd back to login. Also harden 401 race, location deny cache, unpaid repay CTA, and finishLoginNavigate.
This commit is contained in:
@@ -35,8 +35,12 @@ export async function ensurePayReady(returnPath: string): Promise<boolean> {
|
||||
|
||||
goLogin(returnPath, { needWechat: '1' });
|
||||
return false;
|
||||
} catch {
|
||||
goLogin(returnPath);
|
||||
} catch (e) {
|
||||
// 仅会话失效时踢回登录;网络/业务错误不误清登录态
|
||||
const msg = e instanceof Error ? e.message : '';
|
||||
if (/登录已过期|重新登录|401/.test(msg) || !isLoggedIn()) {
|
||||
goLogin(returnPath);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user