小程序where 如何实现动态条件查询?
getFile: function () { const db = wx.cloud.database() let id = this.data.id; console.log(id) //使用云函数获取openid wx.cloud.callFunction({ name: 'login' }).then(res => { db.collection('images').where({ //_openid: res.result.openid, id: this.data.id }).get().then(res2 => { console.log(res2); this.setData({ images: res2.data }) }) }) }, 同样的语句用openid查可以查出所有记录,用id查,返回空数组 甚至改成id:‘1584010371524’ 的格式 也返回空数组 数据库权限已经改了八百遍啊八百遍 id可以确定和数据库中所存一致,甚至改成 id:15权限改了八百遍啊八百遍,一直是空