收藏
回答

微信h5页面授权点击拒绝时关闭h5页面

我使用vue开发的h5页面需要获取用户头像等信息,使用微信公众号授权时,当用户点击拒绝授权按钮时要直接退出当前h5页面,而不是什么操作都不做(用户同意授权时流程都正常)


window.location.href ='https://open.weixin.qq.com/connect/oauth2/authorize?appid='+APPID+'&redirect_uri='+local+'&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect';这是吊起用户授权的代码


回答关注问题邀请回答
收藏

3 个回答

登录 后发表内容