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:
@ -10,14 +10,64 @@ import java.util.List;
|
|||||||
public class WxMenuButton implements Serializable {
|
public class WxMenuButton implements Serializable {
|
||||||
private static final long serialVersionUID = -1070939403109776555L;
|
private static final long serialVersionUID = -1070939403109776555L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* 菜单的响应动作类型:
|
||||||
|
* view表示网页类型,
|
||||||
|
* click表示点击类型,
|
||||||
|
* miniprogram表示小程序类型
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单标题,不超过16个字节,子菜单不超过60个字节
|
||||||
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* 菜单KEY值,用于消息接口推送,不超过128字节
|
||||||
|
* click等点击类型必须
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* 网页链接,用户点击菜单可打开链接,不超过1024字节。type为miniprogram时,不支持小程序的老版本客户端将打开本url。
|
||||||
|
* view、miniprogram类型必须
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* 调用新增永久素材接口返回的合法media_id
|
||||||
|
* media_id类型和view_limited类型必须
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
@SerializedName("media_id")
|
@SerializedName("media_id")
|
||||||
private String mediaId;
|
private String mediaId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* 小程序的appid
|
||||||
|
* miniprogram类型必须
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@SerializedName("appid")
|
||||||
|
private String appiId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* 小程序的页面路径
|
||||||
|
* miniprogram类型必须
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@SerializedName("pagepath")
|
||||||
|
private String pagePath;
|
||||||
|
|
||||||
@SerializedName("sub_button")
|
@SerializedName("sub_button")
|
||||||
private List<WxMenuButton> subButtons = new ArrayList<>();
|
private List<WxMenuButton> subButtons = new ArrayList<>();
|
||||||
|
|
||||||
@ -73,4 +123,20 @@ public class WxMenuButton implements Serializable {
|
|||||||
public void setMediaId(String mediaId) {
|
public void setMediaId(String mediaId) {
|
||||||
this.mediaId = mediaId;
|
this.mediaId = mediaId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getAppiId() {
|
||||||
|
return appiId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppiId(String appiId) {
|
||||||
|
this.appiId = appiId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPagePath() {
|
||||||
|
return pagePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPagePath(String pagePath) {
|
||||||
|
this.pagePath = pagePath;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user