姜农-小程序搜索推广
2019-11-19
加粗
标红
插入代码
插入链接
插入图片
上传视频
请 登录 后发表内容
关闭
新增或编辑超链接
链接地址
关闭
插入视频
视频链接
this.recordWatch = db.collection('record').where({
_id: id
}).watch({
onChange: function(snapshot) {
// console.log('docs\'s changed events', snapshot.docChanges)
// console.log('query result snapshot after the event', snapshot.docs)
// console.log('is init data', snapshot.type === 'init')
if (snapshot.type !== 'init') {
let huData = snapshot.docs[0]
if (huData._id !== _this.id) {
console.info("id1: " + huData._id + ",id2: " + _this.id)
return
}
console.info(huData)
delete huData._id
_this.setData({
huData: huData,
})
}
},
onError: function(err) {
console.error('the record watch closed because of error', err)
_this.watchRecord(_this.id)
// _this.onReLaunchApp()
}
})
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。待楼主反馈
2019-11-19
赞
回复
关闭
请选择投诉理由
广告内容
违法违规
恶意灌水内容
其他