Wechat web page authorization login code how to obtain?

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

Menu