安装
npm install axios
导入
import axios from 'axios'
使用
let data = {};
data["aaa"] = this.aaa;
data["bbb"] = this.bbb;
data["vvv"] = this.vvv;
data["ccc"] = "ccc";
console.log(data);
axios.post(httpUrl,data).then(function (response) {
console.log('响应');
console.log(response);
}).catch(function (err) {
console.log('失败');
console.log(err); //捕获异常
});