فهرست منبع

产品 结束

cqpCow 1 سال پیش
والد
کامیت
ca2d25c4ea
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      app/Service/BasicTypeService.php

+ 2 - 2
app/Service/BasicTypeService.php

@@ -38,9 +38,9 @@ class BasicTypeService extends Service
     public function basicTypeList($data){
         $model = BasicType::where('del_time',0)
             ->select('title','id','type')
-            ->orderby('id', 'asc')
-            ->where('type',$data['type']);
+            ->orderby('id', 'asc');
 
+        if(! empty($data['type'])) $model->where('type',$data['type']);
         if(! empty($data['title'])) $model->where('title', 'LIKE', '%'.$data['title'].'%');
 
         $list = $this->limit($model,'',$data);