最终取所有的数据,在服务器端通过下面这行语句返回数据:

res.send(await (await posts).find({}).limit(pageSize * pageNum).sort({lastModifiedAt:-1}).toArray())

遗留问题:如何判断是否还有更多数据并返回给前端?

最后编辑:2021年01月19日 ©著作权归作者所有

发表评论