fix: 优化登陆后history.push逻辑

This commit is contained in:
Shu Guang 2025-05-08 23:44:14 +08:00
parent 75a1070afe
commit 015fe34820

View File

@ -97,9 +97,7 @@ useEffect(()=>{
const urlParams = new URL(window.location.href).searchParams; const urlParams = new URL(window.location.href).searchParams;
history.push(urlParams.get('redirect') || '/'); history.push(urlParams.get('redirect') || '/');
sessionStorage.setItem('avatar_refreshed', '1'); sessionStorage.setItem('avatar_refreshed', '1');
setTimeout(() => { window.location.href = urlParams.get('redirect') || '/';
window.location.reload();
}, 1000);
return; return;
} else { } else {
message.error(res.message); message.error(res.message);