码迷,mamicode.com
首页 > 移动开发 > 详细

项目中使用的axios

时间:2017-09-26 14:54:05      阅读:200      评论:0      收藏:0      [点我收藏+]

标签:response   err   ret   return   cat   error   url   str   form   

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);
})
},

项目中使用的axios

标签:response   err   ret   return   cat   error   url   str   form   

原文地址:http://www.cnblogs.com/ourLifes/p/7596484.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!