页面可以在微信开发者工具中访问,但是通过微信 API ,/m00eecb7308 接口创建菜单,请求结果一直报 :
{
"errcode": 40054,
"errmsg": "invalid sub button url domain rid: 6253ef34-30ba285b-13c9dab9"
}
根据 https://developers.weixin.qq.com/community/develop/article/doc/000eecb7308fe08f695a91acf5b413 排查了,也没有问题,找不到原因了。。。
配置的 json:
{
"button": [
{
"name": "流程管理",
"sub_button": [
{
"type": "view",
"name": "订单管理",
"url": "https%3A%2F%2Fopen.weixin.qq.com%2Fconnect%2Foauth2%2Fauthorize%3Fappid%3Dwx2af78e6a02158b54%26redirect_uri%3Dhttps%3A%2F%2F域名%2Fapi%2Fwechat%2Fauth%3Furl%3Dhttps%3A%2F%2F域名%2Flist%26response_type%3Dcode%26scope%3Dsnsapi_userinfo%26state%3D123%23wechat_redirect"
}
]
}
]
}
已经解决了,就是按照前面大佬说的只对 redirect_uri 中的 url 进行编码,其他不要编码,最后配置的 json 修改为:
{ "button": [ { "name": "流程管理", "sub_button": [ { "type": "view", "name": "订单管理", "url": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx2af78e6a02158b54&redirect_uri=https://域名/api/wechat/auth?url=https%3A%2F%2F域名%2FbindWechatDetail&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect" } ] } ] }