From 80b41ff3018d9acdc2f48ce63ada3c0ca4a37b57 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Tue, 20 Feb 2024 11:47:45 +0800
Subject: [PATCH] 手机号隐藏显示:1.E呼即办2.报事报修3.走访日志4.文章评论4.消防检查记录5.代办事务6.办结事务
---
src/store/modules/user.js | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 7fb5f2f..9400031 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;
@@ -87,6 +91,7 @@
message: data.error_description,
type: "error",
});
+ resolve({ error: "error" });
} else {
commit("SET_TOKEN", data.access_token);
commit("SET_REFRESH_TOKEN", data.refresh_token);
@@ -97,7 +102,12 @@
dispatch("GetMenu").then((menuData) => {
let fistMenu = findChildrenUrl(menuData);
- if (data.role_name == "jdgly" || data.role_name == "sqgly") {
+ if (
+ findChildrenRole(data.role_name, "admin") ||
+ findChildrenRole(data.role_name, "administrator") ||
+ findChildrenRole(data.role_name, "jdgly") ||
+ findChildrenRole(data.role_name, "sqgly")
+ ) {
setStore({ name: "showMenu", content: true });
commit("SET_HOMEFIRSTTAGPAGE", {
@@ -140,7 +150,7 @@
resolve({ fistMenu, menuData });
}
- // commit("DEL_ALL_TAG");
+ commit("DEL_ALL_TAG");
});
}
})
--
Gitblit v1.9.3