标签:com logs 用户 blog redirect cat pos 12px https
this.wxInfo.redirect_uri = encodeURIComponent(window.location.href); var h = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + this.wxInfo.appid + "&redirect_uri=" + this.wxInfo.redirect_uri + "&response_type=code&scope=" + this.wxInfo.scope + "&state=" + this.wxInfo.state + "#wechat_redirect"; window.location.href = h;
H5页面获取微信信息授权-主要参数说明:
redirect_uri 是微信授权后回调的地址参数建议encodeURIComponent一下地址,避免出错(微信公众号授权登录,提示“redirect_uri 参数错误”)
appid 是微信公众号id
H5页面获取微信信息授权,微信授权,微信授权“redirect_uri 参数错误
标签:com logs 用户 blog redirect cat pos 12px https
原文地址:https://www.cnblogs.com/FACESCORE/p/13214712.html