云开发连接数据表时db.collection is not a function?

发布于 6 年前作者 lei758975 次浏览最后编辑 6 年前来自 ask

const db=wx.cloud database

  getDB(){

    db.collection("demolist").get({

      success:res=>{

        console.log(res)

      }

    })


  },

请问这个问题怎么解决呢???

1 回复
qiang92
qiang921 楼4 年前

确认看看是不是写错了。