From 33d81a668d13750dfe460098c8cbaa50406ddf34 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 24 Jan 2024 18:15:57 +0800
Subject: [PATCH] 管理员显示首页调整

---
 src/store/modules/user.js |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 7862508..34d5546 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -29,8 +29,8 @@
   }
 }
 
-function findChildrenRole (data, str) {
-    return data.split(',').find(item => item == str)
+function findChildrenRole(data, str) {
+  return data.split(",").find((item) => item == str);
 }
 
 function addPath(ele, first) {
@@ -101,7 +101,11 @@
 
               dispatch("GetMenu").then((menuData) => {
                 let fistMenu = findChildrenUrl(menuData);
-                if (findChildrenRole(data.role_name, "jdgly") ||findChildrenRole(data.role_name, "sqgly")) {
+                if (
+                  findChildrenRole(data.role_name, "admin") ||
+                  findChildrenRole(data.role_name, "jdgly") ||
+                  findChildrenRole(data.role_name, "sqgly")
+                ) {
                   setStore({ name: "showMenu", content: true });
 
                   commit("SET_HOMEFIRSTTAGPAGE", {

--
Gitblit v1.9.3