文档例子中bucket应该是bucketAuto发布于 5 年前作者 xiuying616698 次浏览最后编辑 5 年前来自 askhttps://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-sdk-api/database/aggregate/Aggregate.bucketAuto.html db.collection('items').aggregate() .bucket({ groupBy: '$price', buckets: 3, }) .end()