小程序云端函数 where遇到的问题
db.collection(name).where(
{
theme: mytext
}
).get()
上面的mytext是函数传的参数,string 类型 值是‘山水’ ,获取不到数据
db.collection(name).where(
{
theme: ‘山水’
}
).get()
上面直接用字面量 ‘山水’就可以获得数据
这是为什么呢?如何解决!
str.trim()
存在空格。。。。

浙公网安备 33010602011771号