忘记密码与部门改为懒加载

This commit is contained in:
孙景学
2025-07-18 13:39:45 +08:00
parent e637f62d86
commit 505562892f
8 changed files with 480 additions and 61 deletions

View File

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