fix: 优化登陆后history.push逻辑
This commit is contained in:
parent
75a1070afe
commit
015fe34820
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user