原生开发小程序大家试过吗? 从建立项目开始一步一步开发属于你自己的小程序.

日期描述作者
2019/12/10初始化何也盒也

速览

    • GET 操作
      • 根据条件拿到信息

GET 操作

云开发设计到初始化

wx.cloud.init({  env: ':cloud environment id:'})const db = wx.cloud.database()

根据条件拿到信息

拿到要查询表的全部信息, 经过一层 for 循环过滤掉所选信息即可.

  • 初始化云环境
  • 连接数据库
  • 拿到全部数据
  • 过滤结果
  • db.collection(':collections id:').get({  success: res=> {    console.log(':collections id:', res.data)    // todo somethings    for(let i = 0; i < res.data.length; i++){      let realRes = []      // there is no async in this segment      if(conditions){        realRes.push(res.data[i])      }    }      },  fail: ()=> {    console.error(':collections id: has acurd some wrongs!')  }})小程序

    TAG标签: 微信小程序微信操作频率过快

    http://www.xiaochengxub.com/read-106566.html