小程序云开发collection().get()无法获取数据库数据?
不是权限问题。 [图片] [代码]onLoad: [代码][代码]function[代码] [代码](options) {[代码][代码] [代码][代码]const db = wx.cloud.database()[代码][代码] [代码][代码]const ce = db.collection([代码][代码]'tst2'[代码][代码]).get({[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]console.log(res.data)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]"imgUrls"[代码][代码]: ce[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][图片] ---------------------------------------------------------------------------------------------- 已经解决 [代码]const db = wx.cloud.database()[代码][代码] [代码][代码]db.collection([代码][代码]'prj'[代码][代码]).limit(4).get({[代码][代码] [代码][代码]success: res => {[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]"prjUrls"[代码][代码]: res.data[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码]