From e8b8c6418c393341da52f66ed47d735fa8f41ea3 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 23 七月 2024 15:53:33 +0800 Subject: [PATCH] 2024-07-23 --- src/tabviews/zshare/actionList/normalbutton/index.jsx | 46 +++++++++++++++++++++++++++++----------------- 1 files changed, 29 insertions(+), 17 deletions(-) diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index c4b526d..b1555d2 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -1386,7 +1386,21 @@ method: btn.method || 'post' } - if (btn.cross === 'true') { + if (btn.ContentType) { + _params.headers = { + 'Content-Type': btn.ContentType + } + } + + if (btn.$outerScript) { + if (JSON.stringify(param) !== '{}') { + if (btn.stringify === 'qs') { + _params.data = qs.stringify(param) + } else { + _params.data = param + } + } + } else if (btn.cross === 'true') { if (JSON.stringify(param) !== '{}') { if (btn.stringify === 'qs') { _params.data = qs.stringify(param) @@ -1420,13 +1434,7 @@ _params.method = 'post' } - if (btn.ContentType) { - _params.headers = { - 'Content-Type': btn.ContentType - } - } - - Api.directRequest(_params).then(res => { + Api.directRequest(_params, btn.$outerScript, 'outer').then(res => { if (typeof(res) !== 'object') { let error = '鏈煡鐨勮繑鍥炵粨鏋滐紒' @@ -2359,12 +2367,8 @@ tabId = btn.refreshTab[btn.refreshTab.length - 1] } - // if (btn.formCache === 'clear') { // 娓呴櫎琛ㄥ崟缂撳瓨 - // window.GLOB.CacheMap = new Map() - // } - if (tabId && btn.$MenuID === tabId) { // 鍒锋柊褰撳墠鑿滃崟鏃讹紝鍋滄鍏朵粬鎿嶄綔 - MKEmitter.emit('reloadMenuView', tabId, 'table') + MKEmitter.emit('reloadMenuView', tabId) return } @@ -2406,7 +2410,7 @@ } if (tabId) { - MKEmitter.emit('reloadMenuView', tabId, 'table') + MKEmitter.emit('reloadMenuView', tabId) } if (btn.switchTab && btn.switchTab.length > 0) { @@ -2555,8 +2559,16 @@ let domain = '' let appId = window.GLOB.WXAppID || '' - if (verify.wxAppId && window.GLOB.WXApps && window.GLOB.WXApps.findIndex(item => item.appId === verify.wxAppId) > -1) { + if (verify.wxAppId && verify.wxAppId !== appId) { appId = verify.wxAppId + if (!window.GLOB.WXApps || window.GLOB.WXApps.findIndex(item => item.appId === verify.wxAppId) === -1) { + notification.warning({ + top: 92, + message: '鎸夐挳鍏宠仈鍏紬鍙蜂笉鍦ㄥ彲鐢ㄥ垪琛ㄤ腑锛岃閲嶆柊淇濆瓨鎸夐挳閰嶇疆锛�', + duration: 5 + }) + return + } } if (['8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok'].includes(verify.wxTemplateId) && window.GLOB.sysType !== 'cloud') { @@ -3103,7 +3115,7 @@ tabId = btn.refreshTab[btn.refreshTab.length - 1] } if (tabId && btn.$MenuID === tabId) { // 鍒锋柊褰撳墠鑿滃崟鏃讹紝鍋滄鍏朵粬鎿嶄綔 - MKEmitter.emit('reloadMenuView', tabId, 'table') + MKEmitter.emit('reloadMenuView', tabId) return } @@ -3135,7 +3147,7 @@ } if (tabId) { - MKEmitter.emit('reloadMenuView', tabId, 'table') + MKEmitter.emit('reloadMenuView', tabId) } } -- Gitblit v1.8.0