优化获取昵称修改状态的时机

This commit is contained in:
2025-12-03 15:44:41 +08:00
parent 7c1a1fafc1
commit b77b4b0536
9 changed files with 160 additions and 128 deletions

View File

@@ -20,7 +20,7 @@ const LoginPage: React.FC = () => {
const {
params: { redirect },
} = useRouter();
const { fetchUserInfo } = useUserActions();
const { fetchUserInfo, checkNicknameChangeStatus } = useUserActions();
// 执行微信登录的核心逻辑
const execute_wechat_login = async (e: any) => {
@@ -41,6 +41,7 @@ const LoginPage: React.FC = () => {
if (response.success) {
save_login_state(response.token!, response.user_info!);
fetchUserInfo();
checkNicknameChangeStatus();
setTimeout(() => {
if (redirect) {