Commit 951c8ea0 authored by zfc's avatar zfc

冲突

parent 9e5a7e9e
......@@ -105,33 +105,6 @@ class Client extends Basic
return $this->response(200,'成功',$data);
}
/**经纪人搜索
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function agentSearch(){
$table= new Agents;
$data['msg'] = '';
$params = $this->request->param();
$search=$params['search'];
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$field=['id','realname','phone'];
$where='level in(2,5) ';
if(!empty($search)){
$where.=" and realname like '%$search%' or phone like '%$search%' ";
$data['search']=$search;
}
$order="id desc";
$data['list']=$table->searchList($pageNo, $pageSize,$order,$field, $where);
$total=$table->searchTotal($where);
$data['total']= ceil($total / $pageSize);
$data['page']=$pageNo;
return $this->response(200,'成功',$data);
}
/**app 经纪人用户列表
......
......@@ -30,12 +30,6 @@ class BaseModel extends Model
/**
* 新增或编辑数据
<<<<<<< HEAD
* @param array/object $data 来源数据
* @param boolean $kv 主键值
* @param string $key 主键名
* @return [type] 执行结果
=======
*
* @param $data //来源数据
* @param bool $kv 主键值
......@@ -43,23 +37,12 @@ class BaseModel extends Model
* @param bool $confirm 是否验证
* @return false|int 执行结果
*
>>>>>>> test-hujun1.15-111
*/
public function editData($data,$kv=false,$key='id',$confirm=false)
{
$this->allowField(true);
if ($confirm) {//是否验证
<<<<<<< HEAD
$this->validate($confirm);
}
if($kv){//编辑
$res=$this->save($data,[$key=>$kv]);
}else{
$res=$this->data($data)->save();
}
=======
$this->validate($confirm);
......@@ -75,21 +58,10 @@ class BaseModel extends Model
}
>>>>>>> test-hujun1.15-111
return $res;
}
/**
<<<<<<< HEAD
* 列表
*
* @param type $pageNo
* @param type $pageSize
* @param type $order_
* @param type $field
* @param type $params
* @return type
=======
* 公用方法,列表
*
* @param int $pageNo
......@@ -101,7 +73,6 @@ class BaseModel extends Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
>>>>>>> test-hujun1.15-111
*/
public function getList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '') {
return $this->field($field)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment