shawenguan hai 1 ano
pai
achega
c6f47b5594
Modificáronse 2 ficheiros con 4 adicións e 5 borrados
  1. 1 1
      Scripts/util/MagicJS3.js
  2. 3 4
      Scripts/wubian/wubianNotice.js

+ 1 - 1
Scripts/util/MagicJS3.js

@@ -486,7 +486,7 @@ function MagicJS(scriptName = "MagicJS", logLevel = "INFO") {
                 appToken: "AT_7wDWqSoT8xpJCQqJtHpshKhw7kXc0XCW",
                 content: content,// 这是主体内容
                 summary: summary,// 该参数可选,默认为 msg 的前10个字符
-                contentType: 1,
+                contentType: 1,//内容类型 1表示文字  2表示html(只发送body标签内部的数据即可,不包括body标签,推荐使用这种) 3表示markdown
                 // topicIds: [32852],
                 topicIds: [],
                 uids: [

+ 3 - 4
Scripts/wubian/wubianNotice.js

@@ -239,7 +239,6 @@ async function tryNewNotice() {
                 }
             }
         }
-        magicJS.notification.msg(item.title, item.content);
     }
 }
 
@@ -247,8 +246,8 @@ async function doCustomWxpusherSend(title, content) {
     let data = {
         appToken: "AT_7wDWqSoT8xpJCQqJtHpshKhw7kXc0XCW",
         content: content,// 这是主体内容
-        summary: summary,// 该参数可选,默认为 msg 的前10个字符
-        contentType: 1,
+        summary: title,// 该参数可选,默认为 msg 的前10个字符
+        contentType: 2,
         // topicIds: [32852],
         topicIds: [],
         uids: [
@@ -258,7 +257,7 @@ async function doCustomWxpusherSend(title, content) {
         verifyPay: false,
         verifyPayType: 0,
     };
-    return magicJS.doWxpusherSend(data);
+    return await magicJS.doWxpusherSend(data);
 }
 
 async function getNoticeListByCategory(type, page, pageSize, tenantId) {