一般axios书写:
axios({
method:"post",
url:"http://localhost:8080/xxx/xxx",
data:this.data
}).then(function (resp) {
/*执行回调函数,对收到的数据进行操作*/
})
简化axios书写:
axios.get("/xxx/xxx").then(resp=>{
/*执行回调函数,对收到的数据进行操作*/
})
掉用get只是示例,还有其他的方法,简写熟悉后非常方便