const db = uniCloud.database();
const collection=db.collection('sblist');
//链表查
var res=await collection.aggregate()
.lookup({
from: 'uni-id-users',
localField: 'uid',
foreignField: '_id',
as: 'user',
})
//筛选
.match({
uid: event.uid
})
//排序 按时间倒叙
.sort({
time: -1
})
//跳过
.skip((event.page) * 20)
//限制条数
.limit(20)
.end()