From f1ff27e72013b5c89de241d4d3ab11244aa91e15 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期三, 12 十一月 2025 17:30:14 +0800
Subject: [PATCH] fix: 四流
---
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