From 268be11f39b248920a76568135f8b7b6c4fa9e52 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 13 三月 2020 16:37:22 +0800
Subject: [PATCH] 2020-03-13

---
 src/components/header/index.jsx |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx
index 78bd106..2ef03c9 100644
--- a/src/components/header/index.jsx
+++ b/src/components/header/index.jsx
@@ -83,14 +83,9 @@
     _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' // 鏃堕棿鎴�
     _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)   // md5瀵嗛挜
 
-    let localResult = await Api.getLocalConfig(_param)
-    let result = {status: true}
+    let result = await Api.getSystemConfig(_param) // 鍙栨秷淇敼鏈湴瀵嗙爜锛屽彧淇敼鍗曠偣鏈嶅姟鍣�
 
-    if (window.GLOB.mainSystemApi && window.GLOB.subSystemApi !== window.GLOB.mainSystemApi) {
-      result = await Api.getSystemConfig(_param)
-    }
-
-    if (result.status && localResult.status) {
+    if (result.status) {
       this.setState({
         visible: false,
         confirmLoading: false
@@ -103,7 +98,7 @@
     } else {
       notification.warning({
         top: 92,
-        message: result.message || localResult.message,
+        message: result.message,
         duration: 10
       })
       this.setState({
@@ -214,6 +209,7 @@
       let _permFuncField = []
       if (result.UserRoles && result.UserRoles[0] && result.UserRoles[0].RoleMenu) {
         result.UserRoles[0].RoleMenu.forEach(menu => {
+          if (!menu.MenuID) return
           _permAction[menu.MenuID] = true
         })
       }

--
Gitblit v1.8.0