From 5ec575e709400c13eca01b6ffc70e789c0647215 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 24 Jan 2024 13:48:42 +0800
Subject: [PATCH] 首页显示BUG修复

---
 src/store/modules/user.js |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 7fb5f2f..7862508 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -29,6 +29,10 @@
   }
 }
 
+function findChildrenRole (data, str) {
+    return data.split(',').find(item => item == str)
+}
+
 function addPath(ele, first) {
   const menu = website.menu;
   const propsConfig = menu.props;
@@ -97,7 +101,7 @@
 
               dispatch("GetMenu").then((menuData) => {
                 let fistMenu = findChildrenUrl(menuData);
-                if (data.role_name == "jdgly" || data.role_name == "sqgly") {
+                if (findChildrenRole(data.role_name, "jdgly") ||findChildrenRole(data.role_name, "sqgly")) {
                   setStore({ name: "showMenu", content: true });
 
                   commit("SET_HOMEFIRSTTAGPAGE", {
@@ -140,7 +144,7 @@
                   resolve({ fistMenu, menuData });
                 }
 
-                // commit("DEL_ALL_TAG");
+                commit("DEL_ALL_TAG");
               });
             }
           })

--
Gitblit v1.9.3