From 16f80ddfc338bc65a893c1b7eb93d1d9861158b2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 02 七月 2023 23:05:17 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |   58 +++++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 45 insertions(+), 13 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index f49846b..cf67e2e 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -4,6 +4,7 @@
 import qs from 'qs'
 import { is, fromJS } from 'immutable'
 import { Button, Modal, notification, message, Drawer, Switch, Checkbox, Progress } from 'antd'
+import md5 from 'md5'
 
 import Api from '@/api'
 import Utils, { getSysDefaultSql } from '@/utils/utils.js'
@@ -1103,7 +1104,8 @@
             this.execError(res)
           }
           _resolve()
-        }, () => {
+        }, (error) => {
+          if (error && error.ErrCode === 'LoginError') return
           this.updateStatus()
           _resolve()
         })
@@ -1116,7 +1118,8 @@
                   this.triggerNote(res) // 娑堟伅
                 }
                 resolve(res)
-              }, () => {
+              }, (error) => {
+                if (error && error.ErrCode === 'LoginError') return
                 this.updateStatus()
                 _resolve()
               })
@@ -1143,7 +1146,7 @@
           _resolve()
         })
       } else { // 瓒呭嚭20涓姹傛椂寰幆鎵ц
-        if (btn.progress === 'progressbar' && btn.$toolbtn && params.length > 1) {
+        if (btn.progress === 'progressbar' && params.length > 1) {
           this.setState({
             loadingTotal: params.length
           })
@@ -1164,7 +1167,7 @@
         _params = this.getInnerParam(data, formdata, btn.callbackType === 'script')
       }
 
-      if (_params.length > 1 && btn.progress === 'progressbar' && btn.$toolbtn) {
+      if (_params.length > 1 && btn.progress === 'progressbar') {
         this.setState({
           loadingTotal: _params.length
         })
@@ -1185,7 +1188,7 @@
         params = this.getInnerParam(data, formdata, btn.callbackType === 'script')
       }
 
-      if (params.length > 1 && btn.progress === 'progressbar' && btn.$toolbtn) {
+      if (params.length > 1 && btn.progress === 'progressbar') {
         this.setState({
           loadingTotal: params.length
         })
@@ -1232,7 +1235,8 @@
         this.execError(res)
         _resolve()
       }
-    }, () => {
+    }, (error) => {
+      if (error && error.ErrCode === 'LoginError') return
       this.updateStatus()
       _resolve()
     })
@@ -1424,7 +1428,8 @@
         this.execError(res)
         _resolve()
       }
-    }, () => {
+    }, (error) => {
+      if (error && error.ErrCode === 'LoginError') return
       this.updateStatus()
       _resolve()
     })
@@ -1639,7 +1644,8 @@
         this.execError(res)
         _resolve()
       }
-    }, () => {
+    }, (error) => {
+      if (error && error.ErrCode === 'LoginError') return
       this.updateStatus()
       _resolve()
     })
@@ -1702,7 +1708,8 @@
         this.execError(res)
         _resolve()
       }
-    }, () => {
+    }, (error) => {
+      if (error && error.ErrCode === 'LoginError') return
       this.updateStatus()
       _resolve()
     })
@@ -1764,7 +1771,8 @@
         this.execError(res)
         _resolve()
       }
-    }, () => {
+    }, (error) => {
+      if (error && error.ErrCode === 'LoginError') return
       this.updateStatus()
       _resolve()
     })
@@ -1834,7 +1842,8 @@
         return
       }
       this.outerCallbackRequest(params, res, record, outParam, _resolve)
-    }, () => {
+    }, (error) => {
+      if (error && error.ErrCode === 'LoginError') return
       this.outerCallbackRequest(params, {status: false, message: 500, ErrCode: 'E', ErrMesg: 500}, record, outParam, _resolve)
     })
   }
@@ -2426,6 +2435,29 @@
             duration: 5
           })
         }
+      }, (error) => {
+        if (error && error.ErrCode === 'LoginError') {
+          let param = {
+            func: 's_visitor_login',
+            timestamp: moment().format('YYYY-MM-DD HH:mm:ss'), 
+            SessionUid: 'bh0bapabtd45epsgra79segbch6c1ibk',
+            TypeCharOne: 'pc',
+            appkey: '202004041613277377A6A2456D34A4948AE84'
+          }
+
+          param.LText = md5(window.btoa('bh0bapabtd45epsgra79segbch6c1ibk' + param.timestamp))
+          param.secretkey = md5(param.LText + 'mingke' + param.timestamp)
+
+          let params = {
+            url: 'https://sso.mk9h.cn/webapi/dologon',
+            method: 'post',
+            data: JSON.stringify(param)
+          }
+
+          Api.directRequest(params)
+
+          return
+        }
       })
     })
   }
@@ -2996,8 +3028,8 @@
       className = 'mk-btn mk-' + (btn.class || 'unset')
     }
 
-    if (loadingNumber && !loadingTotal && btn.$toolbtn && (!btn.show || btn.show === 'button')) {
-      label = (loadingNumber && !loadingTotal ? `(${loadingNumber})` : '') + btn.label
+    if (loadingNumber && btn.progress !== 'progressbar' && btn.$toolbtn && (!btn.show || btn.show === 'button')) {
+      label = (loadingNumber ? `(${loadingNumber})` : '') + btn.label
     }
 
     return <>

--
Gitblit v1.8.0