刚刚,公众号自定义菜单URL里的的&符号都过滤了,怎么回事?
发布于 7 年前 作者 hfu 5171 次浏览 来自 官方Issues
{
	"button": [{
			"type": "view",
			"name": "测试",
			"url": "https://graph.qq.com/oauth2.0/show?which=Login&display=pc&response_type=code&client_id=101487368&redirect_uri=https%3A%2F%2Fpacaio.match.qq.com%2Fqq%2FloginBack%3Fsurl%3Dhttp%3A%2F%2Fcoral.qq.com%2F4927810101&state=5b481c68e379d"
		}
	]
}

get回来是这个

{
    "menu": {
        "button": [
            {
                "type": "view", 
                "name": "测试", 
                "url": "https://graph.qq.com/oauth2.0/show?which=Logindisplay=pcresponse_type=codeclient_id=101487368redirect_uri=https%3A%2F%2Fpacaio.match.qq.com%2Fqq%2FloginBack%3Fsurl%3Dhttp%3A%2F%2Fcoral.qq.com%2F4927810101state=5b481c68e379d", 
                "sub_button": [ ]
            }
        ]
    }
}

&全过滤了啊!!!!!

1 回复

用decodeURIComponent转下即可

回到顶部