vue axios后端接收不到参数
后端收接不到参数的代码
this.axios.post('/api/goods/checkOrder',{code:'code'}).then(function(response) {
console.log(response);
}).catch(function(error) { console.log(error);});
修改解决代码
let data = new FormData(); //创建表单数据对象
data.append('code','code'); //添加表单数据对象
this.axios.post('/api/goods/checkOrder',data).then(function(response) {
console.log(response);
}).catch(function(error) { console.log(error);});