云开发查询操作为什么没有数据也可以查询成功?
查询代码片段:
let that= this const db = wx.cloud.database() db.collection( 'userData' ).where({ _openid:app.globalData.openId }).get({ success: res => { console.log(res.data) console.log( this ) console.log( '[数据库] [查询记录] 成功: ' , res) }, fail: err => { wx.showToast({ icon: 'none' , title: '查询记录失败' }) console.error( '[数据库] [查询记录] 失败:' , err) } }) |
数据库图片
![](https://image.wxopen.club/content_af763bf6-4f1f-11ea-afcc-001a7dda7111.png)
查询成功截图:
![](https://image.wxopen.club/content_af8e2dd8-4f1f-11ea-971e-001a7dda7111.png)