From 56162f1a82ff5bdce5ba22889ba1545ba4f39e48 Mon Sep 17 00:00:00 2001 From: cxdbz Date: Tue, 26 Feb 2019 20:13:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8D=A3=E8=AA=89=E5=86=8C=E4=B8=AD=E6=95=99?= =?UTF-8?q?=E5=B8=88=E8=8D=A3=E8=AA=89=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/rongyu/controller/JsRongyuInfo.php | 2 ++ application/rongyu/model/JsRongyuInfo.php | 8 ++++++-- application/rongyu/view/js_rongyu/create.html | 1 - application/rongyu/view/js_rongyu_info/index.html | 1 + application/rongyu/view/js_rongyu_info/read.html | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/application/rongyu/controller/JsRongyuInfo.php b/application/rongyu/controller/JsRongyuInfo.php index 19484e4d..0287e0a7 100644 --- a/application/rongyu/controller/JsRongyuInfo.php +++ b/application/rongyu/controller/JsRongyuInfo.php @@ -57,11 +57,13 @@ class JsRongyuInfo extends Base 'hjschool'=>$getdt['hjschool'], 'fzschool'=>$getdt['fzschool'], 'category'=>$getdt['category'], + 'rongyuce'=>$getdt['rongyuce'], 'search'=>$getdt['search']['value'], 'order'=>$order, 'order_field'=>$order_field ]; + // 实例化 $ryinfo = new ryinfo; diff --git a/application/rongyu/model/JsRongyuInfo.php b/application/rongyu/model/JsRongyuInfo.php index c9adb149..f1b460b0 100644 --- a/application/rongyu/model/JsRongyuInfo.php +++ b/application/rongyu/model/JsRongyuInfo.php @@ -14,6 +14,7 @@ class JsRongyuInfo extends Base $hjschool = $search['hjschool']; $fzschool = $search['fzschool']; $category = $search['category']; + $rongyuce = $search['rongyuce']; $order_field = $search['order_field']; $order = $search['order']; $category = $search['category']; @@ -35,8 +36,11 @@ class JsRongyuInfo extends Base $q->name('JsRongyu')->where('category','in',$category)->field('id'); }); }) - ->when(!empty($search),function($query) use($search){ - $query->where('title','like',$search); + ->when(!empty($rongyuce),function($query) use($rongyuce){ + $query->where('rongyuce',$rongyuce); + }) + ->when(!empty($search),function($query) use($search){ + $query->where('title','like',$search); }) ->with( [ diff --git a/application/rongyu/view/js_rongyu/create.html b/application/rongyu/view/js_rongyu/create.html index 4aa9d888..1a01acf8 100644 --- a/application/rongyu/view/js_rongyu/create.html +++ b/application/rongyu/view/js_rongyu/create.html @@ -3,7 +3,6 @@ {/block} {block name="formaa"}
-
diff --git a/application/rongyu/view/js_rongyu_info/index.html b/application/rongyu/view/js_rongyu_info/index.html index ea01ed52..6b087463 100644 --- a/application/rongyu/view/js_rongyu_info/index.html +++ b/application/rongyu/view/js_rongyu_info/index.html @@ -142,6 +142,7 @@ }); return chk; }, + rongyuce:"", }, }; diff --git a/application/rongyu/view/js_rongyu_info/read.html b/application/rongyu/view/js_rongyu_info/read.html index bf11cd75..e0c0455e 100644 --- a/application/rongyu/view/js_rongyu_info/read.html +++ b/application/rongyu/view/js_rongyu_info/read.html @@ -142,6 +142,7 @@ }); return chk; }, + rongyuce:"{$list.id}", }, };