mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-04-05 17:38:05 +08:00
自定义菜单加入对小程序的支持 #170
This commit is contained in:
parent
5d92da6a35
commit
2d5fcb31b4
@ -10,14 +10,64 @@ import java.util.List;
|
||||
public class WxMenuButton implements Serializable {
|
||||
private static final long serialVersionUID = -1070939403109776555L;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 菜单的响应动作类型:
|
||||
* view表示网页类型,
|
||||
* click表示点击类型,
|
||||
* miniprogram表示小程序类型
|
||||
* </pre>
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 菜单标题,不超过16个字节,子菜单不超过60个字节
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 菜单KEY值,用于消息接口推送,不超过128字节
|
||||
* click等点击类型必须
|
||||
* </pre>
|
||||
*/
|
||||
private String key;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 网页链接,用户点击菜单可打开链接,不超过1024字节。type为miniprogram时,不支持小程序的老版本客户端将打开本url。
|
||||
* view、miniprogram类型必须
|
||||
* </pre>
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 调用新增永久素材接口返回的合法media_id
|
||||
* media_id类型和view_limited类型必须
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("media_id")
|
||||
private String mediaId;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 小程序的appid
|
||||
* miniprogram类型必须
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("appid")
|
||||
private String appiId;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 小程序的页面路径
|
||||
* miniprogram类型必须
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("pagepath")
|
||||
private String pagePath;
|
||||
|
||||
@SerializedName("sub_button")
|
||||
private List<WxMenuButton> subButtons = new ArrayList<>();
|
||||
|
||||
@ -73,4 +123,20 @@ public class WxMenuButton implements Serializable {
|
||||
public void setMediaId(String 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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user