vue之发送请求
post请求方式
post - formdata的提交 表单提交方式
poat - formdata的提交
let data = new FormData();
data.append("sparePartCode", this.editForm.sparePartCode)
data.append("safeQty", this.editForm.safeQty)
this.$http.post(service.API_EDIT_DATA, data).then(res => {
console.log("编辑的确定", res);
})
post - json格式
let successList = []
let url = service.API_IMPORT_DATA;
this.$http
.post(url, successList)
.then((result) => {
})
.catch((e) => {
});