云函数模糊查询问题?

发布于 9 年前作者 min417196 次浏览最后编辑 9 年前来自 issues

await db.collection(cname).where({

_openid: OPENID,

// 模糊查询

activity_title: db.RegExp({

regexp: searchValue, //从搜索栏中获取的value作为规则进行匹配。

options: ‘i’, //大小写不区分

})

}).orderBy(‘createTime’, ‘desc’)。。。。。

请教:以上云函数中的代码  错误提示: regexp must be a string

传入的是个空字符串,该怎么写?

0 回复
暂无回复