From a1d03a0e810219f8353748f6e55699bf2e1a77a6 Mon Sep 17 00:00:00 2001 From: Admin <978517621@qq.com> Date: 星期一, 15 八月 2022 19:48:10 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/router/backEnd.ts | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/router/backEnd.ts b/src/router/backEnd.ts index 023d0b6..83a8d37 100644 --- a/src/router/backEnd.ts +++ b/src/router/backEnd.ts @@ -3,7 +3,6 @@ import pinia from '/@/stores/index'; import { useUserInfo } from '/@/stores/userInfo'; import { useRequestOldRoutes } from '/@/stores/requestOldRoutes'; -import { Session } from '/@/utils/storage'; import { NextLoading } from '/@/utils/loading'; import { dynamicRoutes, notFoundAndNoPower } from '/@/router/route'; import { formatTwoStageRoutes, formatFlatteningRoutes, router } from '/@/router/index'; @@ -11,6 +10,7 @@ import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes'; import { useMenuApi } from '/@/api/systemManage/menu/index'; import { ElMessage } from 'element-plus'; +import Cookies from 'js-cookie'; const menuApi = useMenuApi(); @@ -26,8 +26,8 @@ export async function initBackEndControlRoutes() { if (window.nextLoading === undefined) NextLoading.start(); - if (!Session.get('token')) return false; - const res = await getBackEndControlRoutes(Session.get('projectId') === null ? '' : Session.get('projectId')); + if (!Cookies.get('token')) return false; + const res = await getBackEndControlRoutes(Cookies.get('projectId') === null ? '' : Cookies.get('projectId')); await useRequestOldRoutes().setRequestOldRoutes(JSON.parse(JSON.stringify(res.data.data))); dynamicRoutes[0].children = await backEndComponent(res.data.data); await setAddRoute(); @@ -70,7 +70,7 @@ * @description 路径:/src/views/system/homeMenu/component/menuDialog.vue */ export function setBackEndControlRefreshRoutes() { - getBackEndControlRoutes(Session.get('projectId')); + getBackEndControlRoutes(Cookies.get('projectId')); } export function backEndComponent(routes: any) { -- Gitblit v1.9.2