vue的ajax请求之axios

axios.get(this.apiUrl+'good/info',{params:{'goodsid':'sp441153'}})
.then(function(response){
console.log(response);
_this.pics=response.data.data.pics;
_this.message=response.data.data;
_this.goodsAttr=response.data.data.goods_attr;
_this.colorList=response.data.data.color_list;
_this.sizeList=response.data.data.size_list;

})
.catch(function(response) {
console.log(response);
})

原文地址:https://www.cnblogs.com/bluesky1024/p/6775046.html