当前位置:网站首页>云函数实现模糊搜索功能
云函数实现模糊搜索功能
2022-06-21 16:03:00 【JSONP$】
云函数实现模糊搜索功能
sou(e){
console.log(e.detail);
const searchKey =e.detail
if(searchKey&&searchKey.length>0){
// 模糊搜索代码
db.collection('zhusir_video').where({
name:db.RegExp({
regexp:searchKey,
options:'i'
})
}).get()
.then(res=>{
console.log(res);
console.log(res.data);
this.setData({
searchValue:res.data
})
}).catch(res=>{
console.log(res);
})
}else{
wx.showToast({
title: '搜索词不能为空',
icon:'none'
})
}
},
边栏推荐
- Alibaba cloud server + pagoda panel + no domain name deployment web project
- 既不是研发顶尖高手,也不是销售大牛,为何偏偏获得 2 万 RMB 的首个涛思文化奖?
- Pytest框架实现前后置的处理
- How to judge DNS resolution failure? How to resolve DNS resolution errors?
- Move Protocol Beta测试版稳定,临时决定奖池规模再扩大
- 南京大学 静态软件分析(static program analyzes)-- introduction 学习笔记
- rtmp webrtc 协议 openssl 等安装
- Yaml数据驱动演示
- RTMP webrtc protocol OpenSSL installation
- The new razor component supports proxy connection to RDP, and jumpserver fortress v2.23.0 is released
猜你喜欢
随机推荐
Pytest框架
Machine learning model monitoring (Apria)
【mysql学习笔记15】用户管理
【SQLite】解决unrecognized token:“‘“
Design and implementation of face verification system for floating population management
4. 构造【LR(1)分析表(包含构建项目规范族)】
海外new things | 美国人工智能初创「Zoovu」新一轮融资1.69亿美元,为消费者优化线上的“产品发现”体验
exness:美国通货膨胀影响太大,美联储大佬纷纷表态
What does container cloud mean? What is the difference with fortress machine?
Summary of the 16th week
【毕业N年系列】 毕业第四年
Starkrocks Lecture 2 basic operation (1)
Actual combat - store login test
变量
进击的程序员,如何提升研发效能?|直播预告
[从零开始学习FPGA编程-38]:进阶篇 -语法-函数与任务
第13周总结博客(校历第15周)动态规划总结
Beaucoup de sociétés de logiciels sont en fait des "blagues"
Garbage collector
Qtcreator error reporting solution
![[graduation n-year series] the fourth year of graduation](/img/0a/e7d903dec475c54ba1277fe133963f.png)








