redirect_uri回调自定义参数的场合 参数获取不到?
发布于 3 年前 作者 panjuan 4781 次浏览 来自 官方Issues

采用的是手机h5页面 指定公众号授权的方式: 前端H5:var url = encodeURIComponent(‘https://xxx/wechat/preauthcodeRecive?componentAppid=’ + componentAppId + ‘&bizAppid=’ + appId);

window.location.href="<a href="https://mp.weixin.qq.com/safe/bindcomponent?action=bindcomponent&amp;no_scan=1&amp;component_appid=" rel="noopener noreferrer" target="_blank">https://mp.weixin.qq.com/safe/bindcomponent?action=bindcomponent&amp;no\_scan=1&amp;component\_appid=</a>" + componentAppId +&nbsp;

	"&amp;pre\_auth\_code="&nbsp; + preAuthCode + "&amp;redirect\_uri=" + url + "&amp;auth\_type=1&amp;biz\_appid=" + appId + "\#wechat\_redirect";

后端 回调接口 可以取到componentAppid 和auth_code, 但是取不到bizAppid ; 经打印参数可以看到:

log:name =expires_in     value =3600

log:name =componentAppid     value =wx89087e017c69aa03

log:name =amp;bizAppid     value =wxc6086956feb3b432

log:name =auth_code     value =queryauthcode@@@I19o8C9p6rZDzPrp8GyZjPkUCjj8TTIcN1ZR0Af8hURbtd8_iph4S9GI1Ecj12-30adIAeavVHvq3DsHa0lMcA

bizAppid传回来的时候变为了: amp;bizAppid; q求教怎么解决、encodeURIComponent编码问题嘛?

回到顶部