为什么db.collection.count出来的total出来后就没了?
发布于 5 年前 作者 fang50 3317 次浏览 来自 官方Issues

db.collection(‘comment’).where({

messageid: newmessage._id

}).count().then(

res=> {

others = res.total;

console.log(others);

}

)

然后再将others赋值给其它data就没有用

回到顶部