手机预览第一次正常,第二次不正常,以后都不正常,真机调试一直正常,不知道为啥?
发布于 4 年前 作者 ming43 13777 次浏览 最后一次编辑是 3 年前 来自 官方Issues

db.collection(‘xxxxx’).where({})

.watch({

    onChange: snapshot=> {

      console.log('docs\‘s changed events’, snapshot.docChanges)

     console.log(‘is init data’, snapshot.type === ‘init’)

         var pCount=snapshot.docChanges.length

}

}

1 回复

请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

回到顶部