diff --git a/app/customer/controller/Contact.php b/app/customer/controller/Contact.php index ec8ce69..b3bc2ac 100644 --- a/app/customer/controller/Contact.php +++ b/app/customer/controller/Contact.php @@ -25,7 +25,7 @@ class Contact extends BaseController $where = array(); $whereOr = array(); if (!empty($param['keywords'])) { - $where[] = ['a.id|a.name', 'like', '%' . $param['keywords'] . '%']; + $where[] = ['a.id|a.name|a.mobile|c.name', 'like', '%' . $param['keywords'] . '%']; } $where[] = ['a.delete_time', '=', 0]; diff --git a/app/customer/view/contact/index.html b/app/customer/view/contact/index.html index b4eda97..67c156e 100644 --- a/app/customer/view/contact/index.html +++ b/app/customer/view/contact/index.html @@ -2,6 +2,13 @@ {block name="body"}
+
+
+ + +
+ +
{/block} @@ -84,6 +91,19 @@ }); } }); + + //监听搜索提交 + form.on('submit(webform)', function(data) { + layui.pageTable.reload({ + where: { + keywords: data.field.keywords + }, + page: { + curr: 1 + } + }); + return false; + }); } {/block}