Python_ applet (cloud development)

First, cloud development API initialization

wx.cloud.init ({ 
   the env: 'Test-x1dzi', // environment ID 
   traceUser: to true    // Check if the user information to the console 
})

Second, the development of cloud API initialization - server

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

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

Third, an array of query

// in the array. wxml file 
<button bindtap = "query"> query array </ the Button>

//
in the array .js file const db = wx.cloud.database () const _ = db.command Page ({ Query. function () { Console .log ( "Query" ) db.collection ( "Data" ) .Where ({ COUNT:. _ in ([l, 3,4 ]) }) GET () the then (the console.log).. } })

Fourth, cloud development field class query

 

Fives,

Guess you like

Origin www.cnblogs.com/cxys85/p/11325019.html