- 合伙人端 PartnerSessionContext 微信回跳 catch 原把后端 「该账号已暂停使用,请联系客服人员」错误整体吞掉,导致 DISABLED 账号微信登录无任何反馈 - 改为用 toastError 显式提示,与短信路径一致(微信同理) Co-Authored-By: WorkBuddy <workbuddy@tencent.com>
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
} from '../lib/api';
|
||||
import { fetchClientConfig, processPartnerWechatOAuthCallback } from '../lib/wechat-auth';
|
||||
import { isWechatEnv } from '../lib/weixin';
|
||||
import { toastError } from '../lib/toast';
|
||||
|
||||
export type PartnerAccount = PartnerMe & {
|
||||
staffRole?: PartnerStaffRole;
|
||||
@@ -115,7 +116,10 @@ export function PartnerSessionProvider({ children }: { children: ReactNode }) {
|
||||
}
|
||||
stripOAuthParamsFromLocation();
|
||||
}
|
||||
} catch {
|
||||
} catch (e) {
|
||||
// 微信 OAuth 回跳后后端可能因账号暂停(DISABLED)等拒绝登录,
|
||||
// 必须把错误显式提示出来,否则用户无任何反馈(与短信路径一致)。
|
||||
toastError(e instanceof Error ? e.message : '微信登录失败');
|
||||
stripOAuthParamsFromLocation();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user