登录
获取url的?后面传过来的参数,只能获取平铺的 key:字符串
function getQuery() {
//location.search是从当前URL的?号开始的字符串 ,截取并解决乱码
var flag = decodeURI(window.location.search.substr(1));
var obj = {}, arr = flag ? (flag.split('&') || []) : []
arr.forEach(function (v) {
var newArr = v.split('=');
obj[newArr[0]] = newArr[1]
});
return obj
}