Browse Source

产品 结束

cqpCow 1 năm trước cách đây
mục cha
commit
ca2d25c4ea
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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);