From 0559bee7aa852d88fedf9002504f52d9e6228eb4 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 01 七月 2024 16:03:40 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/zshare/actionList/normalbutton/index.jsx | 54 +++++++++++++++++++++++++++++++++++------------------- 1 files changed, 35 insertions(+), 19 deletions(-) diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 8f0c450..9c00d6e 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -2359,12 +2359,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 +2402,7 @@ } if (tabId) { - MKEmitter.emit('reloadMenuView', tabId, 'table') + MKEmitter.emit('reloadMenuView', tabId) } if (btn.switchTab && btn.switchTab.length > 0) { @@ -2552,10 +2548,37 @@ } sendWxMessage = (verify, id) => { - if (!window.GLOB.nginx) { + let domain = '' + let appId = window.GLOB.WXAppID || '' + + 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') { + domain = 'https://cloud.mk9h.cn/' + appId = 'wx4d8a34c8d4494872' + } + + if (!window.GLOB.nginx && !domain) { notification.warning({ top: 92, message: 'nginx鏈嶅姟灏氭湭寮�鍚紝涓嶅彲鍙戦�佹ā鏉挎秷鎭��', + duration: 5 + }) + return + } else if (!appId) { + notification.warning({ + top: 92, + message: '灏氭湭娣诲姞鍏紬鍙稩D锛屼笉鍙彂閫佹ā鏉挎秷鎭��', duration: 5 }) return @@ -2569,13 +2592,6 @@ param.LText = Utils.getuuid() param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) - - let domain1 = '' - let domain2 = '' - if (['8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok'].includes(verify.wxTemplateId) && window.GLOB.sysType !== 'cloud') { - domain1 = 'https://cloud.mk9h.cn/' - domain2 = 'https://cloud.mk9h.cn:8443/' - } Api.genericInterface(param).then(res => { // res.send_data = [{openid: 'o2E7gvoSFvQRG7I8_gZxf4y3ONkQ', send_id: Utils.getuuid(), p1: '010000000001', p2: '鏄庣', p3: 'dddd', p4: '椤洪', p5: '鎴愬姛'}] @@ -2639,11 +2655,11 @@ return m }) - Api.wxAccessToken(domain1).then(res => { - if (!res.oa_access_token) return + Api.wxAccessToken(appId, domain).then(res => { + if (!res.access_token) return params.forEach(n => { - Api.wxNginxRequest(`${domain2}cgi-bin/message/template/send?access_token=${res.oa_access_token}`, 'post', JSON.stringify(n)).then(re => { + Api.wxNginxRequest(`${domain}cgi-bin/message/template/send?access_token=${res.access_token}`, 'post', JSON.stringify(n)).then(re => { if (verify.wxNoteCallback === 'true') { let msg = re.errmsg || '' @@ -3091,7 +3107,7 @@ tabId = btn.refreshTab[btn.refreshTab.length - 1] } if (tabId && btn.$MenuID === tabId) { // 鍒锋柊褰撳墠鑿滃崟鏃讹紝鍋滄鍏朵粬鎿嶄綔 - MKEmitter.emit('reloadMenuView', tabId, 'table') + MKEmitter.emit('reloadMenuView', tabId) return } @@ -3123,7 +3139,7 @@ } if (tabId) { - MKEmitter.emit('reloadMenuView', tabId, 'table') + MKEmitter.emit('reloadMenuView', tabId) } } -- Gitblit v1.8.0