zxhxx 3 anos atrás
pai
commit
f8f1a3ff41

+ 1 - 0
application/api/controller/Lave.php

@@ -20,6 +20,7 @@ class Lave extends Api
                 ['paid',1],
                 ['category_id',0],
                 ['order',''],
+                ['key',''],
             ],$request
         );
         $this->success('获取成功',LaveModel::lst($where));

+ 1 - 0
application/common/model/Lave.php

@@ -120,6 +120,7 @@ class Lave extends BaseModel
         if(isset($where['paid']) && $where['paid']>-1) $xwhere['paid'] = $where['paid'];
         if(isset($where['help_id']) && $where['help_id']>-1) $xwhere['help_id'] = $where['help_id'];
         if(isset($where['order']) && $where['order']!='') $order = $where['order'];
+        if(isset($where['key']) && $where['key']!='') $xwhere['name|contact|tel'] = ['like',"%{$where['key']}%"];
         $data = $model->where($xwhere)->order($order)->page($where['page'],$where['limit'])->select();
         $count = $model->where($xwhere)->count();
         return compact('count','data');