From b763c47e4892f2b413711e69bbc06f961c757e64 Mon Sep 17 00:00:00 2001 From: Shu Guang <61069967+shuguangnet@users.noreply.github.com> Date: Sun, 18 May 2025 18:56:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/User/Login/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/User/Login/index.tsx b/src/pages/User/Login/index.tsx index 8ad3e92..c280f3c 100644 --- a/src/pages/User/Login/index.tsx +++ b/src/pages/User/Login/index.tsx @@ -94,10 +94,11 @@ useEffect(()=>{ message.success(defaultLoginSuccessMessage); await fetchUserInfo(); // 登录成功后,设置刷新标记并刷新页面 - const urlParams = new URL(window.location.href).searchParams; - history.push(urlParams.get('redirect') || '/'); + // const urlParams = new URL(window.location.href).searchParams; + // history.push(urlParams.get('redirect') || '/'); sessionStorage.setItem('avatar_refreshed', '1'); - window.location.href = urlParams.get('redirect') || '/'; + window.location.href = '/user/access'; + history.push('/user/access'); return; } else { message.error(res.message);