一进入页面,跳转到微信网页授权,拿code,此时页面重新加载了一次,而且还能回退,怎么不让它重新加载且禁止回退呢?
window.location.replace(
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=xxxx&redirect_uri=${encodeURIComponent(
location.href
)}&response_type=code&scope=snsapi_base&state=wechat_redirect#wechat_redirect`
);