vue-resource/ axios
请求数据
https://www.jianshu.com/p/c2e1a07bd1f7
https://www.bootcdn.cn/vue-resource/
this.$http({
url: '/Home/Login',
method: "POST",
body: {
"AccountName": "administrator",
"AccountPassword": "1",
},
}).then(function (res) {
}, function (err) {
//请求失败的回调
console.log("请求失败")
})
this.$http.post('url',
{}
).then(function (res) {
//请求成功函数
}, function () {
//请求失败函数
});