Python_小程序(云开发)

一、云开发API初始化

wx.cloud.init({
   env:'test-x1dzi', //环境ID
   traceUser:true   //是否在控制台查看用户信息
})

二、云开发API初始化-服务端

安装SDK npm install --save wx-server-sdk

const cloud = require('wx-server-sdk')
cloud.init({
    env:'test-x1dzi'
})

三、数组查询

//在数组里。wxml文件
<button bindtap="query">数组查询</button>

//
在数组里.js文件 const db = wx.cloud.database() const _ = db.command Page({ query.function(){ console.log("Query") db.collection("data").where({ count: _.in([1,3,4]) }).get().then(console.log) } })

四、云开发字段类查询

五、

猜你喜欢

转载自www.cnblogs.com/cxys85/p/11325019.html
今日推荐