From 8476f2f9acf26b08863c34e84ebad1f59299e1aa Mon Sep 17 00:00:00 2001 From: hdm Date: Tue, 27 Sep 2022 14:29:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=A8=A1=E5=9D=97=EF=BC=8C?= =?UTF-8?q?=E8=81=94=E7=B3=BB=E4=BA=BA=E5=88=97=E8=A1=A8=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/customer/controller/Contact.php | 2 +- app/customer/view/contact/index.html | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) 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}