项目中使用的axios

getData(url,data){
this.$http({
method:'post',
url:url,
data:data,
transformRequest:[function(data){
return qs.stringify(data)
}]
}).then(
(response2)=>{
console.log(response2.data.data);
this.list2=response2.data.data;
}
).catch(
function(error2){
console.log(error2);
})
},

posted @ 2017-09-26 14:04  南夏啊南夏  阅读(176)  评论(0编辑  收藏  举报