//前端处理http://localhost:8080/top250?start=0&count=5;start-->为下标count-->为限制
//limit(2) 只会获取两条数据db.top250.find().limit(2)//skip() 下标db.top250.find().skip(1).limit(2)
router.get("/top250",async ctx =>{var {start,count} = ctx.queryconsole.log(ctx.query);if(start == undefined){start=0}if(count==undefined){count=5}var data = await Top250Model.find({}).skip(Number(start)).limit(Number(count))ctx.body = {data,code:200}})
