From 64d26aba0eea7d6f4d6a339b0d2c8cc2e875e823 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期五, 28 十一月 2025 17:14:12 +0800
Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/12333GovernmentWeb

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

diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts
index 925456d..ded2d45 100644
--- a/src/store/modules/permission.ts
+++ b/src/store/modules/permission.ts
@@ -33,12 +33,14 @@
           const res = await baseModuleServices.getCurrentUserModuleList({
             showLoading: false,
           });
-          const accessedRoutes = ascending(addAsyncRoutes(formatModuleList([], null))); // createAccessedRoutes(userMenuList, userInfo)
+          const accessedRoutes = ascending(addAsyncRoutes(formatModuleList(res, null))); // createAccessedRoutes(userMenuList, userInfo)
           //@ts-ignore
           accessedRoutes.push({ path: '/:pathMatch(.*)*', redirect: '/404', hidden: true });
 
           this.addRoutes = accessedRoutes;
-          this.routes = constantRoutes.concat(accessedRoutes);
+          this.routes = constantRoutes
+            .concat(accessedRoutes)
+            .sort((a, b) => (a.meta?.rank ?? 0) - (b.meta?.rank ?? 0));
 
           resolve(accessedRoutes);
         } catch (e) {

--
Gitblit v1.9.1