使用
axios.post('我的url',{objId:id})
.then(function (res) {
console.log(res)
})
.catch(function (error) {
console.log(error);
});
此时405错误
若在组件中直接使用jquery请求
$.post('我的url',{objId:item.id},function (res) {
console.log(res)//200,并正常返回
})
axios的post请求要用QS转换下