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"}