king
2024-08-06 50eee9f9eddfc656688723c9a23792fb775b5cdc
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2556,7 +2556,7 @@
  }
  sendWxMessage = (verify, id) => {
    let domain = ''
    let domain = window.GLOB.baseurl
    let appId = window.GLOB.WXAppID || ''
    if (verify.wxAppId && verify.wxAppId !== appId) {
@@ -2576,14 +2576,7 @@
      appId = 'wx4d8a34c8d4494872'
    }
    if (!window.GLOB.nginx && !domain) {
      notification.warning({
        top: 92,
        message: 'nginx服务尚未开启,不可发送模板消息。',
        duration: 5
      })
      return
    } else if (!appId) {
    if (!appId) {
      notification.warning({
        top: 92,
        message: '尚未添加公众号ID,不可发送模板消息。',
@@ -2663,11 +2656,13 @@
        return m
      })
      Api.wxAccessToken(appId, domain).then(res => {
        if (!res.access_token) return
      // cgi-bin/message/template/send
        params.forEach(n => {
          Api.wxNginxRequest(`${domain}cgi-bin/message/template/send?access_token=${res.access_token}`, 'post', JSON.stringify(n)).then(re => {
        Api.directRequest({
          url: domain + 'wechat/send?appid=' + appId,
          method: 'post',
          data: JSON.stringify(n)
        }).then(re => {
            if (verify.wxNoteCallback === 'true') {
              let msg = re.errmsg || ''
@@ -2718,7 +2713,6 @@
                duration: 5
              })
            }
          })
        })
      })
    })