Wechat shows that the scope parameter can not be empty, because it is a single page application, there is the problem of-sharp number?

problem description


VUE-sharp
www.abc.com
https://open.weixin.qq.com/connect/oauth2/authorize?appid=xxxxxx&redirect_uri=http://www.abc.com/&response_type=code&scope=snsapi_userinfo

https://open.weixin.qq.com/connect/oauth2/authorize?appid=xxxxxx&redirect_uri=http://www.abc.com/login/&response_type=code&scope=snsapi_userinfo

http://www.abc.com/-sharp/login/-sharpscope
history-sharp


Apr.26,2021

use encodeURIComponent () to transcode

const uri = encodeURIComponent(window.location.href.split('?')[0]);
window.location.href = `${this.$store.state.appWechat.gateway}?redirect_uri=${uri}&state=wechat`;
< hr >

after answering the question, I remembered that my authentication API was centrally processed by the backend gateway in order to deal with the authentication of multiple domain names. This uri is cached on the server side and is not sent directly to Wechat's authentication link, so it is not sure that it is feasible.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e60a40-458c8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e60a40-458c8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?