前端获取不到云数据库的记录?
[代码]onQuery:[代码][代码]function[代码][代码](){[代码] [代码] [代码][代码]const db = wx.cloud.database()[代码][代码] [代码][代码]const table = db.collection([代码][代码]'yibao'[代码][代码]).where({[代码][代码] [代码][代码]_id:[代码][代码]'510824194808157100'[代码][代码]}).get({[代码][代码] [代码][代码]success:res=>{[代码][代码] [代码][代码]console.log(res);[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]queryResult: JSON.stringify(res.data, [代码][代码]null[代码][代码], 2)[代码] [代码] [代码][代码]})[代码][代码] [代码][代码]if[代码] [代码](queryResult.length == 0){[代码][代码] [代码][代码]console.log([代码][代码]'[数据库] [查询记录] 失败: '[代码][代码], res)[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]console.log([代码][代码]'[数据库] [查询记录] 成功: '[代码][代码], res)[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail:err=>{[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'查询记录失败'[代码][代码] [代码][代码]})[代码][代码] [代码][代码]console.error([代码][代码]'[数据库] [查询记录] 失败:'[代码][代码], err)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码] [代码] [代码][代码]},[代码] [代码] [代码] //数据库 [图片] 获取到的始终为空,求大神指点。