云函数代码为:
let zhuangtai=db.collection('xuliehao').where({
leixing: 1,
}).count()
return zhuangtai
返回值为:
{"total":2,"errMsg":"collection.count:ok"}代码改为:
let zhuangtai=db.collection('xuliehao').where({
leixing: 1,
}).count()
return zhuangtai.total
返回值预期应该是 2, 实际确为 null
百思不得其解,望大神解惑
没有作用 返回值是{}
return zhuangtai.total
改成
return {total:zhuangtai.total}