var http = "https://192.168.4.18?limit=20&offset=0"
// [{limit:20},{offset:0}]
var arr = http.split("?")[1].split("&")
var res = arr.map(item=>{
var obj = { }
obj[item.split("=")[0]]=item.split("=")[1]
return obj
}
console.log(res)
var str = "?key=你&age=18"
var res = str.slice(1)
var list = res.split("&");
console.log(list)
var key = list[0];
var age = list[1];
key = key.split("=")[1];
age = age.split("=")[1];
var obj ={
key,
age
}
console.log(obj)