Browse Source
* Change trigger menu address Modify the starting error handling * add loginout redirect * use select get pathnamepull/713/head
committed by
ddcat1115
11 changed files with 112 additions and 46 deletions
@ -1,17 +0,0 @@ |
|||
import { routerRedux } from 'dva/router'; |
|||
|
|||
const error = (e, dispatch) => { |
|||
if (e.name === 401 || e.name === 403) { |
|||
dispatch(routerRedux.push('/exception/403')); |
|||
return; |
|||
} |
|||
if (e.name <= 504 && e.name >= 500) { |
|||
dispatch(routerRedux.push('/exception/500')); |
|||
return; |
|||
} |
|||
if (e.name >= 404 && e.name < 422) { |
|||
dispatch(routerRedux.push('/exception/404')); |
|||
} |
|||
}; |
|||
|
|||
export default error; |
|||
Loading…
Reference in new issue