最终取所有的数据,在服务器端通过下面这行语句返回数据:
res.send(await (await posts).find({}).limit(pageSize * pageNum).sort({lastModifiedAt:-1}).toArray())
遗留问题:如何判断是否还有更多数据并返回给前端?
最终取所有的数据,在服务器端通过下面这行语句返回数据:
res.send(await (await posts).find({}).limit(pageSize * pageNum).sort({lastModifiedAt:-1}).toArray())
遗留问题:如何判断是否还有更多数据并返回给前端?
生命不息,折腾不止
286
文章数7
评论数0天
运行天数日 | 一 | 二 | 三 | 四 | 五 | 六 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
最新回复