后端给的修改接口是用body传输的
1、页面中
this.$http.post(’/again/check’,JSON.stringify(this.ocrData),{headers:{‘Content-Type’: ‘application/json’}}).then(res => {
console.log(res.data.data)//data数据
// if(res.data.data.status === 2){
// alert(“获取单据信息失败”)
// }
}).catch(err => {
console.log(err)
})
2、开发者工具
----JSON.stringify() 方法将一个 JavaScript 对象或值转换为 JSON 字符串
----headers:{‘Content-Type’: ‘application/json’}