From 0be3ac0f2f83c1b58249d43850a0e4b4f531a8db Mon Sep 17 00:00:00 2001
From: Mr Ke <kelq@hugeinfo.com.cn>
Date: Fri, 04 Sep 2020 10:56:17 +0800
Subject: [PATCH] 合并用户权限菜单,屏蔽首页工作台最新通知通知内容展示
---
src/module/login/login.jsx | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/src/module/login/login.jsx b/src/module/login/login.jsx
index c8b24b2..ac1e7ad 100644
--- a/src/module/login/login.jsx
+++ b/src/module/login/login.jsx
@@ -68,6 +68,19 @@
}).then(res => {
console.log('res', res);
if (res) {
+ console.log('oa', res.map(({ symbol }) => (symbol)).concat(res.map(({ moduleSymbol }) => (moduleSymbol))).reduce((p, n) => {
+ if (p.indexOf(n) == -1) {
+ return p.concat(n)
+ } else {
+ return p
+ }
+ }, []), getMenuListByPermission(oaMenus, res && res.map(({ symbol }) => (symbol)).concat(res.map(({ moduleSymbol }) => (moduleSymbol))).reduce((p, n) => {
+ if (p.indexOf(n) == -1) {
+ return p.concat(n)
+ } else {
+ return p
+ }
+ }, [])), oaMenus)
window.localStorage.setItem('menu', JSON.stringify(res));
window.localStorage.setItem('menusListByRole', JSON.stringify({
user: { role: 'user', menus: userMenus },
@@ -84,7 +97,6 @@
message.success('登录成功');
console.log('this props', this.props);
history.push({ pathname: "/index" });
-
this.props.setContext && this.props.setContext({ role: 'oa' })
}
})
--
Gitblit v1.8.0