diff --git a/src/router/login.ts b/src/router/config.ts similarity index 100% rename from src/router/login.ts rename to src/router/config.ts diff --git a/src/router/interceptor.ts b/src/router/interceptor.ts index 6fe692c..1059d13 100644 --- a/src/router/interceptor.ts +++ b/src/router/interceptor.ts @@ -1,13 +1,12 @@ /** * by 菲鸽 on 2025-08-19 * 路由拦截,通常也是登录拦截 - * 可以设置路由白名单,或者黑名单,看业务需要选哪一个 - * 我这里应为大部分都可以随便进入,所以使用黑名单 + * 黑白名单的配置,请看 config.ts 文件, EXCLUDE_PAGE_LIST */ import { useTokenStore } from '@/store/token' import { tabbarStore } from '@/tabbar/store' import { getLastPage, parseUrlToObj } from '@/utils/index' -import { EXCLUDE_PAGE_LIST, isNeedLogin, LOGIN_PAGE, LOGIN_PAGE_LIST } from './login' +import { EXCLUDE_PAGE_LIST, isNeedLogin, LOGIN_PAGE, LOGIN_PAGE_LIST } from './config' // 黑名单登录拦截器 - (适用于大部分页面不需要登录,少部分页面需要登录) export const navigateToInterceptor = {