From 28e78df1729329ef5e4d02b4787bd3ac5b3c3981 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Wed, 24 Jan 2024 14:10:12 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/store/modules/user.js | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index b71edea..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", {
@@ -114,7 +118,12 @@
commit("SET_HOMEFIRSTPAGE", "/wel");
- resolve({});
+ resolve({
+ fistMenu: {
+ path: "/wel",
+ },
+ menuData,
+ });
} else {
setStore({ name: "showMenu", content: false });
--
Gitblit v1.9.3