//房间信息实时变更
const _this = this;
const db = wx.cloud.database()
const watcher = db.collection('room').doc(_this.data.roomId)
.watch({
onChange: function(snapshot) {
console.log('snapshot', snapshot)
},
onError: function(err) {
console.error('the watch closed because of error', err)
}
})
数据库如图,我调用了云函数更新seats字段,有大佬看下问题在哪吗
尝试使用where