🎨 【企业微信】发送图文消息里的跳转到小程序的相关参数完善补充

This commit is contained in:
一念无明 2022-04-14 03:45:28 +00:00 committed by binarywang
parent 63c0eb107e
commit 568a989576
2 changed files with 8 additions and 0 deletions

View File

@ -41,4 +41,10 @@ public class NewArticle implements Serializable {
* 按钮文字仅在图文数为1条时才生效 默认为阅读全文 不超过4个文字超过自动截断该设置只在企业微信上生效微工作台原企业号上不生效
*/
private String btnText;
/**小程序appid必须是与当前应用关联的小程序appid和pagepath必须同时填写填写后会忽略url字段**/
private String appid;
/**点击消息卡片后的小程序页面仅限本小程序内的页面。appid和pagepath必须同时填写填写后会忽略url字段**/
private String pagepath;
}

View File

@ -408,6 +408,8 @@ public class WxCpMessage implements Serializable {
articleJson.addProperty("description", article.getDescription());
articleJson.addProperty("url", article.getUrl());
articleJson.addProperty("picurl", article.getPicUrl());
articleJson.addProperty("appid", article.getAppid());
articleJson.addProperty("pagepath", article.getPagepath());
articleJsonArray.add(articleJson);
}
newsJsonObject.add("articles", articleJsonArray);