refactor(projects): new storage system [新的本地数据存储系统]

This commit is contained in:
Soybean
2022-11-17 01:47:06 +08:00
parent 7a58035514
commit 971915948b
23 changed files with 166 additions and 191 deletions

View File

@ -1,7 +1,7 @@
import type { NavigationGuardNext, RouteLocationNormalized } from 'vue-router';
import { routeName } from '@/router';
import { useRouteStore } from '@/store';
import { getToken } from '@/utils';
import { localStg } from '@/utils';
/**
* 动态路由
@ -12,7 +12,7 @@ export async function createDynamicRouteGuard(
next: NavigationGuardNext
) {
const route = useRouteStore();
const isLogin = Boolean(getToken());
const isLogin = Boolean(localStg.get('token'));
// 初始化权限路由
if (!route.isInitAuthRoute) {