云函数内查询
let dbCmd = this.ctx.dbJQL.command
let comment = this.ctx.dbJQL.collection("kcc-user-dynamic-comment")
.field('user_id,dynamic_id,content,status,create_date')
.orderBy('create_date', "desc")
.getTemp();
let user = this.ctx.dbJQL.collection("uni-id-users")
.field('_id,nickname,avatar,gender')
.getTemp();
await this.ctx.dbJQL.collection(comment, user)
.get()
.then(res => {
result = {code: 1, message: "success", data: res.data};
}).catch(err => {
result = {code: 0, message: err.message, data: []};
});
return result