From 8e3431b93b5f3ce2ef6f465e4b78f8b7f55c8cd4 Mon Sep 17 00:00:00 2001 From: SmallBun <30397655+leshalv@users.noreply.github.com> Date: Thu, 11 Nov 2021 11:03:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=B8=A6=E6=9C=89=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=8F=82=E6=95=B0=E6=97=B6=EF=BC=8C=E9=80=80=E5=87=BA?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E6=B7=BB=E5=8A=A0=E5=B9=B6=E6=90=BA=E5=B8=A6?= =?UTF-8?q?=20(#9264)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 路径带有请求参数时,退出跳转添加并携带 * Update AvatarDropdown.tsx --- src/components/RightContent/AvatarDropdown.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/RightContent/AvatarDropdown.tsx b/src/components/RightContent/AvatarDropdown.tsx index d9e67311..fc768c29 100644 --- a/src/components/RightContent/AvatarDropdown.tsx +++ b/src/components/RightContent/AvatarDropdown.tsx @@ -17,14 +17,14 @@ export type GlobalHeaderRightProps = { */ const loginOut = async () => { await outLogin(); - const { query = {}, pathname } = history.location; + const { query = {}, search, pathname } = history.location; const { redirect } = query; // Note: There may be security issues, please note if (window.location.pathname !== '/user/login' && !redirect) { history.replace({ pathname: '/user/login', search: stringify({ - redirect: pathname, + redirect: pathname + search, }), }); } -- GitLab