微信官方文档:https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Creating_Custom-Defined_Menu.html
更新菜单时的原始报文(敏感字段已处理):
{
"button": [
{
"type": "view",
"name": "激活会员",
"url": "https://abcdefgh.abcdefghij.cn/wx/member/activation?abc=abcdefghi"
},
{
"name": "活动入口",
"sub_button": [
{
"type": "miniprogram",
"name": "邀请有礼",
"appid": "xxx",
"pagepath": "pages/market/invite/inviteHome"
},
{
"type": "miniprogram",
"name": "礼品卡",
"appid": "xxx",
"pagepath": "pages/index/index"
},
{
"type": "miniprogram",
"name": "小程序",
"appid": "xxx",
"pagepath": "pages/index/index"
},
{
"type": "view",
"name": "测试",
"url": "https://jpostest.wangdian.cn/"
}
]
},
{
"name": "个人中心",
"sub_button": [
{
"type": "miniprogram",
"name": "会员中心",
"appid": "xxx",
"pagepath": "pages/home/homeMain"
},
{
"type": "miniprogram",
"name": "我的积分",
"appid": "xxx",
"pagepath": "pages/score/myScore"
},
{
"type": "miniprogram",
"name": "优惠券",
"appid": "xxx",
"pagepath": "pages/home/homeMain?page_name=homeCoupon"
},
{
"type": "miniprogram",
"name": "会员资料",
"appid": "xxx",
"pagepath": "pages/member/memberInfo/memberInfo"
},
{
"type": "miniprogram",
"name": "会员特权",
"appid": "xxx",
"pagepath": "pages/member/memberPrivilege/memberPrivilege"
}
]
}
]
}
{ "type": "miniprogram", "name": "小程序", "appid": "xxx", "pagepath": "pages/index/index" }, 这种的要加上url, { "type": "miniprogram", "name": "小程序", "appid": "xxx", "pagepath": "pages/index/index", "url": "http://www.baidu.com" }