云函数代码为:
let zhuangtai=db.collection('xuliehao').where({
leixing: 1,
}).count()
return zhuangtai
返回值为:
{"total":2,"errMsg":"collection.count:ok"}
代码改为:
let zhuangtai={total:2,errMsg:"collection.count:ok"}
return zhuangtai
返回值为:
{"total":2,"errMsg":"collection.count:ok"}
代码改为:
let zhuangtai={total:2,errMsg:"collection.count:ok"}
return zhuangtai.total
返回值为:
2
代码改为:
let zhuangtai=db.collection('xuliehao').where({
leixing: 1,
}).count()
return zhuangtai.total
返回值预期应该是 2, 实际确为 null
百思不得其解,望大神解惑
本文网址:http://www.91bianli.com/weixinxiaochengxu/446.html