

代码:
小于
onLoad: function (options) {
let db=wx.cloud.database();
const _=db.command;
db.collection("goods").where({price:_.lt(77)}).get().then(res=>{
console.log(res.data)
}).catch(err=>{
console.log(err)
})
},
小于等于
onLoad: function (options) {
let db=wx.cloud.database();
const _=db.command;
db.collection("goods").where({price:_.lte(77)}).get().then(res=>{
console.log(res.data)
}).catch(err=>{
console.log(err)
})
},
网友评论