获取多个云数据库中的集合,第一个有内容,其他的都为空,
const cloth1 = wx.cloud.database().collection('yichu1') const cloth2 = wx.cloud.database().collection('yichu2') const cloth3 = wx.cloud.database().collection('yichu3') const cloth4 = wx.cloud.database().collection('yichu4') cloth1.get({ success:function(res){ that.setData({ coatList:res.data }) console.log(that.data.coatList) app.coatList = that.data.coatList } }); cloth2.get({ success:function(res){ that.setData({ topList:res.data }) console.log(that.data.topList) app.topList = that.data.topList } }); cloth3.get({ //如果查询成功的话 success:res=>{ that.setData({ skirtList:res.data }) app.skirtList = that.data.skirtList } }); cloth4.get({ //如果查询成功的话 success:function(res){ that.setData({ pantsList:res.data }) app.pantsList = that.data.pantsList } }); 第一个res可以获取到集合,其他的几个都不能获取数据