输入 getParams('http://xxxx.com/xx?id=1&salas=100') 输出: {id:1, salas: 100} const getParams = (url) => { let obj = {} // 1.先截取问号后面的片段,再以&分隔 let urlArr = url.split('?')[1].split('&'); // 遍历urlArr urlArr.forEach(item => { // 再按=分隔 let itemArr = item.spli...