var queryString = window.location.search; 
var params = parseQueryString(queryString);
//存入localStorage
localStorage.setItem("token",params.token)


//获取location 地址栏参数
function parseQueryString(queryString) {
    var params = {};
    var queryStringWithoutQuestionMark = queryString.slice(1);
    var queryParts = queryStringWithoutQuestionMark.split('&');
    
    queryParts.forEach(function(part) {
        var keyValue = part.split('=');
        var key = decodeURIComponent(keyValue[0]);
        var value = decodeURIComponent(keyValue[1]);
        params[key] = value;
    });
    
    return params;
}