From d0d83a7b81389c24bafe737c66dd04d053d10668 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 3 Aug 2019 23:05:41 +0800 Subject: [PATCH] =?UTF-8?q?#1138=20=E8=8E=B7=E5=8F=96=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E8=8F=9C=E5=8D=95=E9=85=8D=E7=BD=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=B8=AD=E5=A2=9E=E5=8A=A0=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E7=9B=B8=E5=85=B3=E7=9A=84=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../weixin/mp/bean/menu/WxMpSelfMenuInfo.java | 51 +++++++++++++------ 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/menu/WxMpSelfMenuInfo.java b/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/menu/WxMpSelfMenuInfo.java index 4789b470..f0e0a104 100644 --- a/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/menu/WxMpSelfMenuInfo.java +++ b/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/menu/WxMpSelfMenuInfo.java @@ -43,13 +43,13 @@ public class WxMpSelfMenuInfo implements Serializable { @SerializedName("type") private String type; /** - * 菜单名称 + * 菜单名称. */ @SerializedName("name") private String name; /** *
-     * 对于不同的菜单类型,value的值意义不同。
+     * 对于不同的菜单类型,value的值意义不同.
      * 官网上设置的自定义菜单:
      *  
  • Text:保存文字到value; *
  • Img、voice:保存mediaID到value; @@ -58,29 +58,52 @@ public class WxMpSelfMenuInfo implements Serializable { *
  • View:保存链接到url。
  • * * 使用API设置的自定义菜单: - *
  • click、scancode_push、scancode_waitmsg、pic_sysphoto、pic_photo_or_album、 pic_weixin、location_select:保存值到key; + *
  • click、scancode_push、scancode_waitmsg、pic_sysphoto、pic_photo_or_album、pic_weixin、location_select:保存值到key; *
  • view:保存链接到url *
  • */ @SerializedName("key") private String key; /** + * . + * * @see #key */ @SerializedName("url") private String url; + /** + * . + * * @see #key */ @SerializedName("value") private String value; + + /** + *
    +     * 小程序的appid.
    +     * miniprogram类型必须
    +     * 
    + */ + @SerializedName("appid") + private String appId; + /** - * 子菜单信息 + *
    +     * 小程序的页面路径.
    +     * miniprogram类型必须
    +     * 
    + */ + @SerializedName("pagepath") + private String pagePath; + /** + * 子菜单信息. */ @SerializedName("sub_button") private SubButtons subButtons; /** - * 图文消息的信息 + * 图文消息的信息. */ @SerializedName("news_info") private NewsInfo newsInfo; @@ -116,42 +139,41 @@ public class WxMpSelfMenuInfo implements Serializable { } @Data - public static class NewsInButton implements Serializable { + public static class NewsInButton implements Serializable { private static final long serialVersionUID = 8701455967664912972L; /** - * 图文消息的标题 + * 图文消息的标题. */ @SerializedName("title") private String title; /** - * 摘要 + * 摘要. */ @SerializedName("digest") private String digest; /** - * 作者 + * 作者. */ @SerializedName("author") private String author; /** - * show_cover - * 是否显示封面,0为不显示,1为显示 + * 是否显示封面,0为不显示,1为显示. */ @SerializedName("show_cover") private Integer showCover; /** - * 封面图片的URL + * 封面图片的URL. */ @SerializedName("cover_url") private String coverUrl; /** - * 正文的URL + * 正文的URL. */ @SerializedName("content_url") private String contentUrl; /** - * 原文的URL,若置空则无查看原文入口 + * 原文的URL,若置空则无查看原文入口. */ @SerializedName("source_url") private String sourceUrl; @@ -160,7 +182,6 @@ public class WxMpSelfMenuInfo implements Serializable { public String toString() { return WxMpGsonBuilder.create().toJson(this); } - } } }