This repository was archived by the owner on May 7, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -371,12 +371,11 @@ class BaseLayout extends React.Component {
371371 } ) )
372372 }
373373 redirectRoute = ( ) => {
374- const { isLogin } = this . props
375- console . log ( isLogin )
374+ const { isLogin, location, history } = this . props
376375 if ( isLogin ) {
377- this . props . history . push ( '/admin' )
376+ history . push ( location . pathname )
378377 } else {
379- this . props . history . push ( '/login' )
378+ history . push ( '/login' )
380379 }
381380 }
382381 onLogout = ( ) => {
@@ -390,7 +389,6 @@ class BaseLayout extends React.Component {
390389 const { routes = [ ] } = this . props
391390 const { menuData, currentMenu } = this . state
392391 const list = menuData . list
393- console . log ( currentMenu )
394392 return (
395393 < Layout className = "base-layout" >
396394 < Sider >
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ export const global = (state = initState, action) => {
1212 globalLoading : action . globalLoading
1313 }
1414 case "CHECK_IS_LOGIN" :
15- console . log ( 11111 )
1615 sessionStorage . setItem ( 'isLogin' , action . isLogin )
1716 return {
1817 ...state ,
You can’t perform that action at this time.
0 commit comments