在菜单中设置此项。
{
"type": "miniprogram",
"url":"http://mp.weixin.qq.com",
"appid":"*****************",//小程序appid
"pagepath":"pages/user/user?uid=user",
"name": "个人中心"
}
若是公众号菜单,则设置为:
{
"type": "view",
"url": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=\'公众号的appid\'&redirect_uri=要访问的路径,
"name": "菜单名称"
}
错误:
1. {"errcode":40166,"errmsg":"invalid weapp appid hint: [uSdBFA0706vr22]"}
参数appid填写错误,appid参数为小程序appid,需要去小程序的后台去查询;而不是关联的小程序原始id
2.{"errcode":85005,"errmsg":"appid not bind weapp hint: [TtM_1a0070vr20]"}
参数appid填写错误,或者对应公众号没有绑定对应的appid小程序