15.使用orderBy让商品进行升序、降序
2021-08-16 本文已影响0人
陈情令
代码:
// 点击降序
climaol(){
wx.cloud.database().collection("goods").orderBy("price","desc").get().then(res => {
console.log(res.data)
this.setData({dataList:res.data})
}).catch(err => {
console.log(err)
})
},