11 lines
308 B
TypeScript
11 lines
308 B
TypeScript
![]() |
import { history } from 'umi';
|
||
|
|
||
|
export function onRouteChange({ location }: any) {
|
||
|
// const token = localStorage.getItem('token');
|
||
|
// const whiteList = ['/login', '/user/register', '/403', '/404'];
|
||
|
// if (!token && !whiteList.includes(location.pathname)) {
|
||
|
// history.replace('/login');
|
||
|
// }
|
||
|
|
||
|
}
|