DaoYuan
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
src/app.tsx
-
src/components/RightContent/AvatarDropdown.tsx
|
|
|
@ -33,7 +33,7 @@ export async function getInitialState(): Promise<{ |
|
|
|
return undefined; |
|
|
|
}; |
|
|
|
// 如果不是登录页面,执行
|
|
|
|
if (history.location.pathname !== loginPath) { |
|
|
|
if (window.location.pathname !== loginPath) { |
|
|
|
const currentUser = await fetchUserInfo(); |
|
|
|
return { |
|
|
|
fetchUserInfo, |
|
|
|
|
|
|
|
@ -18,7 +18,7 @@ export type GlobalHeaderRightProps = { |
|
|
|
*/ |
|
|
|
const loginOut = async () => { |
|
|
|
await outLogin(); |
|
|
|
const { search, pathname } = history.location; |
|
|
|
const { search, pathname } = window.location; |
|
|
|
const urlParams = new URL(window.location.href).searchParams; |
|
|
|
/** 此方法会跳转到 redirect 参数所在的位置 */ |
|
|
|
const redirect = urlParams.get('redirect'); |
|
|
|
|