SoFunction
Updated on 2025-04-05

vue's $http get request should be added with params operation

vue GET pass parameters must be added with params

this.$('/operation/customer/question/edits',{params:{id: 10}})

To put it another way, VUE officially recommends using axios

vue-resource is not updated

Supplementary knowledge:The method of passing the post get parameter in vue request is different

I am learning Vue, and I have used post requests and get requests in the project, but I found that the method of passing parameters is different.

Example of post request:

checkin (){
this.$('my url',{
mobilePhone:,
password:
},{
emulateJSON: true
}
).then(function(res){
this.$=;
(this.$)
this.$('/content') ;
});
}

Example of get request:

nextOne2 (){
this.$('http://192.168.100.31:8080/wenchuang/guid/addProductFile',{
params: {
filename:,
userid: this.$
},
},{
emulateJSON: true
}
).then(function(res){
++;
= ;
});
},

The above vue $http get request has to be added with params operation. This is all the content I share with you. I hope you can give you a reference and I hope you can support me more.