mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-28 20:43:42 +08:00
自定义菜单加入对小程序的支持 #170
This commit is contained in:
@ -46,6 +46,8 @@ public class WxMenuGsonAdapter implements JsonSerializer<WxMenu>, JsonDeserializ
|
||||
buttonJson.addProperty("key", button.getKey());
|
||||
buttonJson.addProperty("url", button.getUrl());
|
||||
buttonJson.addProperty("media_id", button.getMediaId());
|
||||
buttonJson.addProperty("appid", button.getAppId());
|
||||
buttonJson.addProperty("pagepath", button.getPagePath());
|
||||
if (button.getSubButtons() != null && button.getSubButtons().size() > 0) {
|
||||
JsonArray buttonArray = new JsonArray();
|
||||
for (WxMenuButton sub_button : button.getSubButtons()) {
|
||||
@ -114,6 +116,8 @@ public class WxMenuGsonAdapter implements JsonSerializer<WxMenu>, JsonDeserializ
|
||||
button.setUrl(GsonHelper.getString(json, "url"));
|
||||
button.setType(GsonHelper.getString(json, "type"));
|
||||
button.setMediaId(GsonHelper.getString(json, "media_id"));
|
||||
button.setAppId(GsonHelper.getString(json, "appid"));
|
||||
button.setPagePath(GsonHelper.getString(json, "pagepath"));
|
||||
return button;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user