z***@163.com
z***@163.com
  • 发布:2021-12-09 17:22
  • 更新:2021-12-09 17:22
  • 阅读:564

使用正则表达式模糊查询无效,不报错,始终返回全量数据

分类:uni-app

const db = uniCloud.database();
db.collection('todolist').where({
title: new RegExp(this.userInput, 'ig')
}).get();

使用云函数模糊查询,this.userInput 是用户输入,打印有值,查询返回结果始终是全量数据,where中的正则模糊查询条件没有生效。这是为什么呢?使用 HbuildX 3.2.16.20211122 开发uniapp

2021-12-09 17:22 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复