美文网首页
小程序云函数操作数据库

小程序云函数操作数据库

作者: 忆枫_heartill | 来源:发表于2019-10-24 16:44 被阅读0次

    示例:

    await db.collection('user').where({
        openid: openid
      }).get().then(res => {
        console.log(res)
      })
    

    注意:
    1、使用异步await;
    2、回调使用Promise风格,success, fail, complete则不生效;

    相关文章

      网友评论

          本文标题:小程序云函数操作数据库

          本文链接:https://www.haomeiwen.com/subject/glbhyctx.html