1. jq-ajax
var url = "http://localhost:3000/search"
$.ajax({
url,
type:"get",
data:{
keywords:"你"
},
success:res=>{
console.log(res);
}
})
axios
var url = "/search"
axios({
url,
baseURL:"http://localhost:3000",
method:"get",
params:{
keywords:"你"
}
}).then(res=>{
console.log(res);
})