浏览代码

产品 结束

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){
     public function basicTypeList($data){
         $model = BasicType::where('del_time',0)
         $model = BasicType::where('del_time',0)
             ->select('title','id','type')
             ->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'].'%');
         if(! empty($data['title'])) $model->where('title', 'LIKE', '%'.$data['title'].'%');
 
 
         $list = $this->limit($model,'',$data);
         $list = $this->limit($model,'',$data);