业务需求:h5网页获取微信授权拿到code
let url = "https://www.xxxxxx.com/xx-xx-xxx-xxx/#/pages/auth/register/register";
url = encodeURIComponent(url);
window.location.href=(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx9d8f54ac7d9af4e7&redirect_uri=${url}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`)
重定向结果:"https://www.xxxxxx.com/xx-xx-xxx-xxx/?code=xxxxxxxxxxxxxx&state=123#/pages/auth/register/register"
请问为什么hash地址#后面的字符跑到URL最后去了???(官方文档也未解释这种情况)
url带#号是这样的,不影响使用