refactor(router): 将登录配置从login.ts迁移到config.ts

简化路由配置结构,将登录相关配置集中到config.ts文件中
更新interceptor.ts中的引用路径
This commit is contained in:
feige996
2025-08-22 17:12:21 +08:00
parent 464e2decf0
commit 9fc8f24a85
2 changed files with 2 additions and 3 deletions

View File

@@ -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 = {