删除Vue资源

时间:2019-12-06 19:25:50

标签: javascript vue.js

这是我的代码。我想在用户数组中删除第一个对象,但是在我的浏览器控制台中显示此错误。

  

删除http://localhost:3000/users?id=1 404(未找到)

delete(){
  this.resource = this.$resource("http://localhost:3000/users");
  this.resource.delete({id: 1})
    .then(response => {
      return response
    }, response => {
      console.log(response)
    });
}

0 个答案:

没有答案