From 43a517b80f2803e0dcf6658113520c4a14c8c17f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 22 五月 2023 18:21:52 +0800
Subject: [PATCH] 2023-05-22

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 8a351f8..abea1d7 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2105,7 +2105,18 @@
       this.sendMessage(btn.verify, id)
     }
     if (btn.verify.wxNote === 'true') {
-      this.sendWxMessage(btn.verify, id)
+      if (btn.verify.wxTemplateId === 'mk_category_temp') {
+        let verify = fromJS(btn.verify).toJS()
+        verify.wxTemplateId = verify.wxCustomTempId
+
+        verify.wxNoteKeys = verify.wxNoteKeys.filter(item => item.key)
+
+        if (!verify.wxTemplateId || verify.wxNoteKeys.length === 0) return
+
+        this.sendWxMessage(verify, id)
+      } else {
+        this.sendWxMessage(btn.verify, id)
+      }
     }
   }
 
@@ -2129,7 +2140,7 @@
     param.secretkey = Utils.encrypt(param.LText, param.timestamp)
 
     Api.genericInterface(param).then(res => {
-      res.send_data = [{openid: 'o2E7gvoSFvQRG7I8_gZxf4y3ONkQ', send_id: Utils.getuuid(), first: '鎮ㄧ殑缂磋垂淇℃伅濡備笅', p1: '010000000001', p2: '2022骞�07鏈�03鏃�', p3: '渚涙殩缂磋垂', p4: '20鍏�', p5: '鎴愬姛', remark: '鎰熻阿鎮ㄧ殑浣跨敤锛�'}]
+      res.send_data = [{openid: 'o2E7gvoSFvQRG7I8_gZxf4y3ONkQ', send_id: Utils.getuuid(), p1: '010000000001', p2: '鏄庣', p3: 'dddd', p4: '椤洪', p5: '鎴愬姛'}]
       if (!res.status) {
         notification.warning({
           top: 92,
@@ -2196,13 +2207,19 @@
         params.forEach(n => {
           Api.wxNginxRequest(`cgi-bin/message/template/send?access_token=${res.oa_access_token}`, 'post', n).then(re => {
             if (verify.wxNoteCallback === 'true') {
+              let msg = re.errmsg || ''
+
+              if (msg.length > 50) {
+                msg = msg.substr(0, 50)
+              }
+
               let _p = {
                 func: 's_get_sms_weixin_local_suc_err',
                 upid: id,
                 send_id: n.client_msg_id || '',
                 status_result: re.errcode === 0 ? 'S' : 'E',
                 errcode: re.errcode,
-                msg_result: re.errmsg
+                msg_result: msg
               }
 
               _p.LText = Utils.formatOptions(Utils.getuuid())

--
Gitblit v1.8.0