@@ -99,7 +99,7 @@ function formatWechatError(e: unknown): string {
|
||||
export default function LoginPage() {
|
||||
const navigate = useNavigate();
|
||||
const { applySession, refresh, account } = usePartnerSession();
|
||||
const [params] = useSearchParams();
|
||||
const [params, setSearchParams] = useSearchParams();
|
||||
const quick = params.get('quick') === '1';
|
||||
const savedProfile = getPartnerProfile();
|
||||
const remembered = loadRememberedPhone();
|
||||
@@ -120,6 +120,18 @@ export default function LoginPage() {
|
||||
.catch(() => setWxAuthorize(false));
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (params.get('disabled') === '1') {
|
||||
const tip = '账号已停用或解绑,请重新登录';
|
||||
setMsg(tip);
|
||||
toastError(tip);
|
||||
const next = new URLSearchParams(params);
|
||||
next.delete('disabled');
|
||||
setSearchParams(next, { replace: true });
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
const quickName = savedProfile?.name ?? '城市合伙人';
|
||||
const quickCompany = savedProfile?.companyName ?? '';
|
||||
const quickPhone = savedProfile?.phone || phone;
|
||||
|
||||
Reference in New Issue
Block a user