This commit is contained in:
孙景学
2025-07-21 14:04:20 +08:00
parent 58dd501cb2
commit e9ebd6ac1c
13 changed files with 320 additions and 265 deletions

View File

@ -2,7 +2,7 @@ import { history } from 'umi';
export function onRouteChange({ location }: any) {
const token = sessionStorage.getItem('token');
const whiteList = ['/login', '/forgot', '/403', '/404'];
const whiteList = ['/login', '/forgot', '/register/supplier', '/register/expert', '/403', '/404'];
if (!token && !whiteList.includes(location.pathname)) {
history.replace('/login');
}