调用https://www.vue-js.com/api/v1/topics新建主题接口报错
发布于 7 年前 作者 qq244198692 3515 次浏览 来自 分享
粉丝福利 : 关注VUE中文社区公众号,回复视频领取粉丝福利

那位大侠知道的指导下 谢谢 发布主题的时候报错: Error: Request failed with status code 422 at createError (eval at <anonymous> (app.js:981), <anonymous>:16:15) at settle (eval at <anonymous> (app.js:1168), <anonymous>:18:12) at XMLHttpRequest.handleLoad (eval at <anonymous> (app.js:960), <anonymous>:77:7)

代码如下:参数值都正确 var that=this; axios.post(‘https://www.vue-js.com/api/v1/topics’, { accesstoken: that.accesstoken, title: that.title, tab: that.curtabv, content: that.content }) .then(function(res){ console.log(res) }).catch(function(err){ console.log(err) })

回到顶部