js 获取浏览器路径参数,一行代码解决
location.search .replace('?', '') .split('&') .reduce((ret, item) => { const [key, value] = `${item}`.split('='); ret[key] = value; return ret; }, {});
location.search .replace('?', '') .split('&') .reduce((ret, item) => { const [key, value] = `${item}`.split('='); ret[key] = value; return ret; }, {});