Wechat scans the code and jumps back to the login page to display the URL as follows:
history
:
:
could you tell me how to get code
?
Wechat scans the code and jumps back to the login page to display the URL as follows:
history
:
:
could you tell me how to get code
?
get url, to intercept url strings
isn't this the parameter in the URL?
function GetRequest (value) {
//url:www.bicycle.com?id="123456"&Name="bicycle";
var url = decodeURI(location.search); //?id="123456"&Name="bicycle";
var object = {};
if(url.indexOf("?") != -1)//url
{
var str = url.substr(1); //?
var strs = str.split("&"); //[id="123456",Name="bicycle"];
for(var i = 0; i < strs.length; i PP)
{
object [strs[ I] .split ("=") [0]] = strs[ I] .split ("=") [1]
}
}
return object[value];
}
vue
this.$route.query.code
have you solved this problem
the backend built with vue cli requires Wechat scan code to log in, but Wechat code scan requires redirect_uri jump, but my code is local, how can I test it locally? ...