采用的是手机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&no_scan=1&component_appid=" rel="noopener noreferrer" target="_blank">https://mp.weixin.qq.com/safe/bindcomponent?action=bindcomponent&no\_scan=1&component\_appid=</a>" + componentAppId +
"&pre\_auth\_code=" + preAuthCode + "&redirect\_uri=" + url + "&auth\_type=1&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编码问题嘛?