/**
* 提交表单查询
* '.*'同mysql中的‘%’,模糊查询符号
* $options:'1'表示like条件不区分大小写
*/
formSubmit(e) {
var code = e.detail.value.code
db.collection('demo')
.where({
code:{
$regex:'.*'+code+'.*',
$options:'1'
}
})
.get()
.then(res=>{
console.log(res)
this.setData({itemList:res.data})
})
}