From 115769e9ad3ddc64e21ad7285450c4c563c745ed Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期三, 20 八月 2025 17:20:29 +0800
Subject: [PATCH] 用户管理页面

---
 src/router/utils.ts |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/router/utils.ts b/src/router/utils.ts
index b5e524f..8052c47 100644
--- a/src/router/utils.ts
+++ b/src/router/utils.ts
@@ -27,7 +27,9 @@
 // https://cn.vitejs.dev/guide/features.html#glob-import
 const modulesRoutes = import.meta.glob("/src/views/**/*.{vue,tsx}");
 const quanxianList = ["/item"];
+const managerList = ["/user"];
 
+const userInfo = storageLocal().getItem<DataInfo<number>>(userKey);
 // 鍔ㄦ�佽矾鐢�
 import { getAsyncRoutes } from "@/api/routes";
 
@@ -57,9 +59,11 @@
 /** 杩囨护meta涓璼howLink涓篺alse鐨勮彍鍗� */
 function filterTree(data: RouteComponent[]) {
   const hasFlsh = useUserStoreHook().nowRole.hasFlsh;
+  const isManager = useUserStoreHook().isManager;
   const newTree = cloneDeep(data).filter(
-    (v: { meta: { showLink: boolean } }) => {
+    (v: { path: string; meta: { showLink: boolean } }) => {
       quanxianList.includes(v.path) ? (v.meta.showLink = hasFlsh) : null;
+      managerList.includes(v.path) ? (v.meta.showLink = isManager) : null;
       return v.meta?.showLink !== false;
     }
   );

--
Gitblit v1.9.1