xieb
2024-11-21 018aaab4b30943516f86ef5092d05f2b427147d0
src/permission.ts
@@ -1,7 +1,7 @@
import { ELocalStorageKey, ERouterName } from './types/enums'
import router from '/@/router/index'
const whiteList = ['/' + ERouterName.LOGIN] // 设置白名单
const whiteList = ['/' + ERouterName.LOGIN, '/' + ERouterName.PILOT] // 设置白名单
router.beforeEach(async (to, from, next) => {
  // 确定用户是否已登录过,存在Token