const db = uniCloud.database();
db.collection('todolist').where({
title: new RegExp(this.userInput, 'ig')
}).get();
使用云函数模糊查询,this.userInput 是用户输入,打印有值,查询返回结果始终是全量数据,where中的正则模糊查询条件没有生效。这是为什么呢?使用 HbuildX 3.2.16.20211122 开发uniapp
const db = uniCloud.database();
db.collection('todolist').where({
title: new RegExp(this.userInput, 'ig')
}).get();
使用云函数模糊查询,this.userInput 是用户输入,打印有值,查询返回结果始终是全量数据,where中的正则模糊查询条件没有生效。这是为什么呢?使用 HbuildX 3.2.16.20211122 开发uniapp
0 个回复