js 获取url 中链接的参数这里location的用法可以查看菜鸟教程
let url = window.location.search;
let theequestObj = new Object();
if (url.indexOf("?") != -1) {
let str = url.substr(1);
let strs = str.split("&");
for (let i = 0; i < strs.length; i++) {
theequestObj[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
}
}
console.log("---",theequestObj);