未验证 提交 8e3431b9 编写于 作者: S SmallBun 提交者: GitHub

路径带有请求参数时,退出跳转添加并携带 (#9264)

* 路径带有请求参数时,退出跳转添加并携带

* Update AvatarDropdown.tsx
上级 46415d64
......@@ -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,
}),
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册