为什么db.collection.count出来的total出来后就没了?

发布于 7 年前作者 fang503439 次浏览最后编辑 7 年前来自 issues

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

messageid: newmessage._id

}).count().then(

res=> {

others = res.total;

console.log(others);

}

)

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

0 回复
暂无回复