🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## 信息 ~~~[api] post:/wechatmenu/info *int:id=默认值1#id <<< success { "code": 0, "info": "成功", "data":{ "id": 1, "name": "修改菜单", "menu_id": "0", "type": "view", "url": "http://www.baidu.com", "media_id": "", "appid": "", "pagepath": "", "content": "", "state": 0 } } <<< error ~~~ ## 列表 ~~~[api] post:/wechatmenu/getlist *int:page=1#页码 *int:limit=10#每页显示个数 <<< success { "code": 0, "info": "成功", "data":[ { "id": 5, "name": "我的", "menu_id": "0", "type": "", "url": "", "media_id": "", "appid": "", "pagepath": "", "content": "", "state": 0, "children":[ { "id": 6, "name": "淘宝", "menu_id": "5", "type": "view", "url": "http://www.taobao.com", "media_id": "", "appid": "", "pagepath": "", "content": "", "state": 0 } ] }, ] } <<< error ~~~ ## 添加 ~~~[api] post:/wechatmenu/add *string:name= test#菜单名称 *string:menu_id= 0#菜单级别,一级菜单为0 *string:state= 1#1view表示网页类型,2click表示点击类型,3miniprogram表示小程序类型,4media_id图文,5media_id图片 string:url= type=miniprogram必传 #备用网址 string:media_id= type=media_id必传#微信公众号永久素材id string:appid= type=miniprogram必传#APPID string:pagepath= type=miniprogram必传#小程序路径为空 string:content= test#内容 string:pic_url= test#图片地址 <<< success <<< error ~~~ ## 编辑 ~~~[api] post:/wechatmenu/edit *id:id= 2#关键字回复id *string:name= test#菜单名称 *string:menu_id= 0#菜单级别,一级菜单为0 *string:state= 1#1view表示网页类型,2click表示点击类型,3miniprogram表示小程序类型,4media_id图文,5media_id图片 string:url= type=miniprogram必传 #备用网址 string:media_id= type=media_id必传#微信公众号永久素材id string:appid= type=miniprogram必传#APPID string:pagepath= type=miniprogram必传#小程序路径为空 string:content= test#内容 string:pic_url= test#图片地址 <<< success <<< error ~~~ ## 删除 ~~~[api] post:/wechatmenu/del *int:id=默认值1#id <<< success { "code": 0, "info": "成功", "data": true } <<< error ~~~ ## 排序 ~~~[api] post:/wechatmenu/sort *string:sort=排序#值为array <<< success { "code": 0, "info": "成功", "data": true } <<< error ~~~ ## 发布 ~~~[api] post:/wechatmenu/release <<< success { "code": 0, "info": "成功", "data": true } <<< error ~~~