From e36c643d4d1aaf3f7613b1d70cc52027edf0ea9d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 01 六月 2024 23:04:14 +0800
Subject: [PATCH] 2024-06-01

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 54 insertions(+), 5 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index d4f7524..9c77939 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2320,7 +2320,7 @@
       Modal.success({
         title: msg,
         onOk: () => {
-          this.successContinue(sign, id)
+          this.successContinue(sign, id, res)
         }
       })
       return
@@ -2328,10 +2328,10 @@
 
     }
 
-    this.successContinue(sign, id)
+    this.successContinue(sign, id, res)
   }
 
-  successContinue = (sign, id) => {
+  successContinue = (sign, id, res) => {
     const { btn } = this.props
     const { btnconfig } = this.state
 
@@ -2452,6 +2452,16 @@
       } else {
         url = btn.verify.linkUrl
       }
+
+      if (/@/.test(url)) {
+        Object.keys(res).forEach(key => {
+          url = url.replace(new RegExp('@' + key + '@', 'ig'), res[key])
+        })
+      }
+      if (!/^http/.test(url)) {
+        url = window.location.origin + url
+      }
+
       window.open(url)
     }
   }
@@ -2586,9 +2596,9 @@
 
       if (verify.wxNoteLink === 'url' && verify.wxNoteLinkUrl) {
         _param.url = verify.wxNoteLinkUrl
-      } else if (verify.wxNoteLink === 'miniProgram' && window.GLOB.WXminiAppID) {
+      } else if (verify.wxNoteLink === 'miniProgram' && (window.GLOB.WXminiAppID || verify.wxNoteMiniId)) {
         _param.miniprogram = {
-          appid: window.GLOB.WXminiAppID,
+          appid: verify.wxNoteMiniId || window.GLOB.WXminiAppID,
           pagepath: '/pages/index/index'
         }
 
@@ -3068,8 +3078,47 @@
     } else if (btn.execError === 'closepoptab' || sign === '@close_popup@') {
       MKEmitter.emit('popclose')
     } else if (btn.execError !== 'never') {
+      let tabId = ''
+      if (btn.refreshTab && btn.refreshTab.length > 0) {
+        tabId = btn.refreshTab[btn.refreshTab.length - 1]
+      }
+      if (tabId && btn.$MenuID === tabId) { // 鍒锋柊褰撳墠鑿滃崟鏃讹紝鍋滄鍏朵粬鎿嶄綔
+        MKEmitter.emit('reloadMenuView', tabId, 'table')
+        return
+      }
+
       MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines)
+
+      if (btn.syncComponentId) {
+        if (btn.syncComponentId === 'multiComponent') {
+          btn.syncComponentIds.forEach((id, i) => {
+            setTimeout(() => {
+              if (/\$focus/.test(id)) {
+                MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
+              } else {
+                MKEmitter.emit('reloadData', id)
+              }
+            }, 20 * i)
+          })
+        } else if (/\$focus/.test(btn.syncComponentId)) {
+          MKEmitter.emit('reloadData', btn.syncComponentId.split('$')[0], btn.syncComponentId.split('$')[1])
+        } else {
+          if (btn.syncDelay) {
+            this.delayTimer && clearTimeout(this.delayTimer)
+            this.delayTimer = setTimeout(() => {
+              MKEmitter.emit('reloadData', btn.syncComponentId)
+            }, btn.syncDelay)
+          } else {
+            MKEmitter.emit('reloadData', btn.syncComponentId)
+          }
+        }
+      }
+
+      if (tabId) {
+        MKEmitter.emit('reloadMenuView', tabId, 'table')
+      }
     }
+
     if (btn.OpenType === 'form') {
       let data = this.props.selectedData && this.props.selectedData[0] ? this.props.selectedData[0] : null
 

--
Gitblit v1.8.0