收藏
回答

db.collection() .where 怎样使条件满足才进行筛选?

db.collection(app.globalData.shujuku)
      .where({
        daxue:this.data.daxue//这里怎样满足条件才去筛选,比如this.data.daxue==“全部”的时候不进行筛选应该咋写
      })
      .get()
回答关注问题邀请回答
收藏

1 个回答

  • 阿北
    阿北
    2020-04-08
    	exports.main = async(event, context) => {
    	  let wishRes = {};
    	  wishRes = await db.collection('wish').where({
    	      good: 0
    	    })
    	    .orderBy('createtime', 'desc')
    	    .get();
    	  return {
    	    wishRes: wishRes
    	  }
    	}  
    
    2020-04-08
    有用
    回复 6
    查看更多(1)
登录 后发表内容
问题标签