get方法,此方法向服务器获取我们需要的数据,如果需要传入参数,则需要params

 

click(){
this.$http.post('/xxx',{

params:{'page':1,'size':10

}

}).then((response) =>{
console.log(response)
})

}


delete方法同上。

put方法 .PUT的方法就是其字面表意,将client的资源放在请求URI上,因此

form:{
'page':1,
'size':2
}
click(){
this.$http.put('/xxx',this.form).then((response) =>{
console.log(response)
})

}
post方法如上,将需要传给服务器的资源定义一个变量 放在url里面传给服务器
Logo

前往低代码交流专区

更多推荐