ソースを参照

产品 结束

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);