From c8804ceb1fe2dea76f9949c5ea04423876ee2c81 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 28 六月 2024 14:02:47 +0800 Subject: [PATCH] 2024-06-28 --- src/tabviews/zshare/actionList/normalbutton/index.jsx | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 9a6ee18..c4b526d 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -2553,8 +2553,15 @@ sendWxMessage = (verify, id) => { let domain = '' + let appId = window.GLOB.WXAppID || '' + + if (verify.wxAppId && window.GLOB.WXApps && window.GLOB.WXApps.findIndex(item => item.appId === verify.wxAppId) > -1) { + appId = verify.wxAppId + } + if (['8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok'].includes(verify.wxTemplateId) && window.GLOB.sysType !== 'cloud') { domain = 'https://cloud.mk9h.cn/' + appId = 'wx4d8a34c8d4494872' } if (!window.GLOB.nginx && !domain) { @@ -2564,7 +2571,7 @@ duration: 5 }) return - } else if (!window.GLOB.WXAppID && !domain) { + } else if (!appId) { notification.warning({ top: 92, message: '灏氭湭娣诲姞鍏紬鍙稩D锛屼笉鍙彂閫佹ā鏉挎秷鎭��', @@ -2644,11 +2651,11 @@ return m }) - Api.wxAccessToken(domain).then(res => { - if (!res.oa_access_token) return + Api.wxAccessToken(appId, domain).then(res => { + if (!res.access_token) return params.forEach(n => { - Api.wxNginxRequest(`${domain}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 || '' -- Gitblit v1.8.0