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;
history.push(urlParams.get('redirect') || '/');
sessionStorage.setItem('avatar_refreshed', '1');
setTimeout(() => {
window.location.reload();
}, 1000);
window.location.href = urlParams.get('redirect') || '/';
return;
} else {
message.error(res.message);