where查询,微信云开发云数据库,实现查询条件的增删?(已解决)
发布于 6 年前 作者 juanchang 12989 次浏览 来自 官方Issues

db.collection(‘fang’)

.where({

[‘fields.省市’]: ‘****’, // 当填北京的时候查询出省市为北京的,****为什么时会查出所有的数据??

})

.get()

.then(res => {

console.log(res)

})

.catch(err => {

console.error(err)

})

方案链接:https://blog.csdn.net/suyongsimple/article/details/86627769

2 回复

一个下拉菜单,选择全部的时候查询所有的

不要方括号试试。

.where({

'fields.省市''****',

})

回到顶部