0
我想创建取(定制包装方法)自定义的方法方法是这样的:骨干定义集合
let personCollection = Collection.extend({
mainIndex: 'id',
url: 'https://jsonplaceholder.typicode.com/posts',
model:Person,
findAll:function(){
return this.fetch({url:this.url, type: 'POST'});
}
});
在的findAll()方法,我想改变URL路径和HTTP方法, 但上面的代码发送GET请求