Comments (4)
具体见这条 commit 765291b
from systar.
建议修改前端逻辑,请求limit~就算要page也不用删了limit哈~后端你提issue我来改就好~
from systar.
这个api的设计,微博或者豆瓣的api,都是一个start,一个count这样的。
http://open.weibo.com/wiki/2/statuses/user_timeline
http://developers.douban.com/wiki/?title=shuo_v2
就相当于你把limit参数拆开来,不管怎样,参数里有limit[]看起来还是有点奇怪不够清晰的。
我的版本是一个page 一个per_page 嘛。当时这样做的原因主要在于后端改不用侵入ci,但是前端要改的话需要侵入backbone-pageable,参考 https://github.com/wyuenho/backbone-pageable/blob/master/lib/backbone-pageable.js#L1124,所以没有这样做。
我觉得可以保留 page,per_page 和 offset,limit 两种形式,都有时可以以后者为准。
改后端代码么,主要我希望前后都跑一趟,这样做起事情来比较游刃有余,我们也不用一方等另一方,这样就陷入我们公司现在正在尽力避免的事情当中去了。
getList被调用两次的原因发现了,SS_Controller中有初始化user_model,user_model构造器中的trace方法会去调用getList,这个方法做什么用的啊?
from systar.
哦,有一个比较麻烦的事情是,分页组件需要知道一共有多少条目,现在这个值我在object_model里写死了,感觉拿起来比较麻烦,主要ci的compile_sql 方法变成protected了,而调完db的get方法sql就被reset了,一大串条件要重新拼,再不然可能就需要拎一个函数出来了。
from systar.
Related Issues (15)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from systar.