From f9b459a3fefd5fab0ee8e19268adb9d9eadab2a7 Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期二, 17 十二月 2024 18:16:58 +0800
Subject: [PATCH] 预测项setting的值修改最大输入长度为1000

---
 src/store/modules/permission.ts |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts
index 12ddb45..2000b33 100644
--- a/src/store/modules/permission.ts
+++ b/src/store/modules/permission.ts
@@ -35,15 +35,18 @@
       return new Promise<void>(async (resolve) => {
         // 获得菜单列表,它在登录的时候,setUserInfoAction 方法中已经进行获取
         let res: AppCustomRouteRecordRaw[] = []
-        if (wsSessionCache.get(CACHE_KEY.ROLE_ROUTERS)) {
-          res = wsSessionCache.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[]
+        const roleRouters = wsSessionCache.get(CACHE_KEY.ROLE_ROUTERS)
+        if (roleRouters) {
+          res = roleRouters as AppCustomRouteRecordRaw[]
         }
         const routerMap: AppRouteRecordRaw[] = generateRoute(res)
         // 动态路由,404一定要放到最后面
+        // preschooler:vue-router@4以后已支持静态404路由,此处可不再追加
         this.addRouters = routerMap.concat([
           {
             path: '/:path(.*)*',
-            redirect: '/404',
+            // redirect: '/404',
+            component: () => import('@/views/Error/404.vue'),
             name: '404Page',
             meta: {
               hidden: true,

--
Gitblit v1.9.3