axiso get请求 两种方式

axiso
只支持异步模式

//1th
axios.get(url).then();

//2th
axios.get(url).then(function(res){
    console.log(res.data)
});

var addBean={};
//增加和修改需要传一个bean
axios.get(url,{params: vue.addBean}).then(function(res){
    console.log(res.data)
});

--需要通过多对一和多对多反复的练习

评论

暂无评论