两种传参方式是不同的
get:
vue GET传递参数要加上params
getInfo(){
console.log(this.page)
this.$http.get('http://localhost:8080/resourceController/requestResourceListData',{params:{page:this.page,rows:this.rows}},{
emulateJSON:true
}).then(result =>{
console.log(result.body.rows)
this.list=result.body.rows
})
}
post:
getInfo(){
console.log(this.page)
this.$http.post('http://localhost:8080/resourceController/requestResourceListData',{page:this.page,rows:this.rows},{
emulateJSON:true
}).then(result =>{
console.log(result.body.rows)
this.list=result.body.rows
})
}