去掉无用组件以及修改准入评审列表接口,增加token 验证白名单

This commit is contained in:
孙景学
2025-07-14 08:43:22 +08:00
parent 2f85e2a97e
commit 49f302194f
16 changed files with 65 additions and 906 deletions

View File

@ -1,10 +1,10 @@
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');
// }
const token = sessionStorage.getItem('token');
const whiteList = ['/login', '/user/register', '/403', '/404'];
if (!token && !whiteList.includes(location.pathname)) {
history.replace('/login');
}
}