mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
增加点击图文消息跳转链接
This commit is contained in:
@@ -32,6 +32,9 @@ public class WxMpMaterialNewsArticleGsonAdapter implements JsonSerializer<WxMpMa
|
||||
articleJson.addProperty("digest", article.getDigest());
|
||||
}
|
||||
articleJson.addProperty("show_cover_pic", article.isShowCoverPic() ? "1" : "0");
|
||||
if (null != article.getUrl()) {
|
||||
articleJson.addProperty("url", article.getUrl());
|
||||
}
|
||||
return articleJson;
|
||||
}
|
||||
|
||||
@@ -67,6 +70,10 @@ public class WxMpMaterialNewsArticleGsonAdapter implements JsonSerializer<WxMpMa
|
||||
if (showCoverPic != null && !showCoverPic.isJsonNull()) {
|
||||
article.setShowCoverPic(GsonHelper.getAsBoolean(showCoverPic));
|
||||
}
|
||||
JsonElement url = articleInfo.get("url");
|
||||
if (url != null && !url.isJsonNull()) {
|
||||
article.setUrl(GsonHelper.getAsString(url));
|
||||
}
|
||||
return article;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user