//json转为url参数function shiftUrl(jsons){ let url = ""; for (let i in jsons){ if(url === ""){ url += "?" + i + "=" + jsons[i] }else{ url += "&" + i + "=" + jsons[i] } } return url; }