|
|
|
@ -55,7 +55,6 @@ export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) = |
|
|
|
footerRender: () => <Footer />, |
|
|
|
onPageChange: () => { |
|
|
|
const { location } = history; |
|
|
|
console.log(history); |
|
|
|
// 如果没有登录,重定向到 login
|
|
|
|
if (!initialState?.currentUser && location.pathname !== loginPath) { |
|
|
|
history.push(loginPath); |
|
|
|
|