From a02fc6a77fa1b35c6516b2d37108d80e260c6c85 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 07 十一月 2024 22:05:08 +0800
Subject: [PATCH] 2024-11-07

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

diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx
index 8cf0ff8..4dd6942 100644
--- a/src/components/header/index.jsx
+++ b/src/components/header/index.jsx
@@ -18,6 +18,7 @@
 const Resetpwd = asyncComponent(() => import('@/components/resetPassword'))
 const QrCode = asyncComponent(() => import('@/components/qrcode'))
 const LoginForm = asyncSpinComponent(() => import('./loginform'))
+const SysIcon = asyncComponent(() => import('./sysmessage/icon'))
 
 class Header extends Component {
   state = {
@@ -56,7 +57,9 @@
   componentDidMount () {
     // 鑾峰彇绯荤粺鐨勭増鏈俊鎭紝寤舵椂鏌ヨ
     setTimeout(() => {
-      Api.getAppVersion()
+      if (!window.GLOB.$error) {
+        Api.getAppVersion()
+      }
     }, 1000)
 
     // sessionStorage 璺ㄩ〉闈㈠叡浜�
@@ -117,7 +120,7 @@
   logout = () => {
     const { dict } = this.state
     // 閫�鍑虹櫥褰�
-    let _this = this
+    let that = this
     confirm({
       title: dict['logout_query'] || '鎮ㄧ‘瀹氳閫�鍑哄悧锛�',
       content: '',
@@ -125,7 +128,7 @@
       cancelText: dict['cancel'] || '鍙栨秷',
       onOk() {
         sessionStorage.clear()
-        _this.props.history.replace('/login')
+        that.props.history.replace('/login')
         window.location.reload()
       },
       onCancel() {}
@@ -290,7 +293,7 @@
 
           if (PageParam.OpenType === 'outpage' && PageParam.linkUrl) {
             fstItem.OpenType = 'newpage'
-            fstItem.src = PageParam.linkUrl
+            fstItem.src = window.GLOB.systemType === 'production' && PageParam.linkProUrl ? PageParam.linkProUrl : PageParam.linkUrl
             if (/#\/iframe\//.test(fstItem.src)) {
               fstItem.src = fstItem.src.replace(/@loginuid@/ig, sessionStorage.getItem('LoginUID'))
               fstItem.type = 'iframe'
@@ -329,7 +332,7 @@
                 ParentNames: [fst.MenuName, snd.MenuName],
                 MenuNo: trd.MenuNo,
                 EasyCode: trd.EasyCode,
-                type: 'CommonTable',
+                type: 'CustomPage',
                 OpenType: 'newtab',
                 hidden: 'false'
               }
@@ -338,7 +341,7 @@
                 try {
                   let PageParam = JSON.parse(trd.PageParam)
 
-                  trdItem.type = PageParam.Template || 'CommonTable'
+                  trdItem.type = PageParam.Template || 'CustomPage'
                   trdItem.OpenType = PageParam.OpenType || 'newtab'
                   trdItem.hidden = PageParam.hidden || 'false'
                   trdItem.menuColor = PageParam.menuColor || ''
@@ -346,7 +349,7 @@
 
                   if (trdItem.type === 'NewPage') {
                     trdItem.OpenType = 'newpage'
-                    trdItem.src = PageParam.url || ''
+                    trdItem.src = window.GLOB.systemType === 'production' && PageParam.proUrl ? PageParam.proUrl : PageParam.url || ''
                     if (/#\/iframe\//.test(trdItem.src)) {
                       trdItem.src = trdItem.src.replace(/@loginuid@/ig, sessionStorage.getItem('LoginUID'))
                       trdItem.type = 'iframe'
@@ -428,7 +431,7 @@
             if (!isNaN(s) && s > 90) {
               Modal.warning({
                 width: 520,
-                title: <span>绯荤粺妫�娴嬪埌鎮ㄧ殑璐︽埛瀛樺湪椋庨櫓锛岃鍙婃椂鍒�<a target="_blank" rel="noopener noreferrer" href="https://cloud.mk9h.cn/admin/index.html">浜戜腑蹇�</a>淇敼瀵嗙爜锛�</span>,
+                title: <span>绯荤粺妫�娴嬪埌鎮ㄧ殑璐︽埛瀛樺湪椋庨櫓锛岃鍙婃椂鍒�<a target="_blank" rel="noopener noreferrer" href="https://cloud.positecgroup.com/admin/index.html">浜戜腑蹇�</a>淇敼瀵嗙爜锛�</span>,
                 okText: '鐭ラ亾浜�'
               })
               return
@@ -785,6 +788,7 @@
             <SearchOutlined className="search-menu" />
           </Dropdown> : null
         }
+        {window.GLOB.SysNotice ? <SysIcon /> : null}
         {/* 澶村儚銆佺敤鎴峰悕 */}
         <Dropdown className="header-setting" overlay={menu}>
           <div>

--
Gitblit v1.8.0