Commit 59a9ff50 authored by hujun's avatar hujun

查询经纪人

parent 8f850ad7
...@@ -72,4 +72,35 @@ class Broker extends Basic ...@@ -72,4 +72,35 @@ class Broker extends Basic
return $this->response($data['status'], $data['msg'],$data['data']); return $this->response($data['status'], $data['msg'],$data['data']);
} }
/**
* 获取经纪人列表
*
* @return \think\Response
*/
public function getBroker() {
$data['status'] = 200;
$data['data'] = '';
$data['msg'] = '';
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$where = '';
if ($this->params['phone']) {
$where = '(phone like "'.$this->params['phone'].'%" or name like "'.$this->params['phone'].'%")';
}
if ($this->params['level']) {
$where .= ' AND level in ('.$this->params['level'].')';
}
if ($where) {
$agent = new AAgents();
$field = 'id,name,phone';
$data['data'] = $agent->getList($pageNo, $pageSize, 'id DESC', $field, $where);
} else {
$data['msg'] = '没有经纪人信息';
}
return $this->response($data['status'], $data['msg'], $data['data']);
}
} }
\ No newline at end of file
...@@ -215,6 +215,7 @@ Route::group('broker', [ ...@@ -215,6 +215,7 @@ Route::group('broker', [
'statusBargain' => [ 'api_broker/OrderLog/statusBargain', [ 'method' => 'get|post' ] ], 'statusBargain' => [ 'api_broker/OrderLog/statusBargain', [ 'method' => 'get|post' ] ],
'login' => [ 'api_broker/Broker/login', [ 'method' => 'get' ] ], //经纪人登陆 'login' => [ 'api_broker/Broker/login', [ 'method' => 'get' ] ], //经纪人登陆
'editClient' => [ 'api_broker/Client/editClient', [ 'method' => 'get|post' ] ],//添加和编辑客户 'editClient' => [ 'api_broker/Client/editClient', [ 'method' => 'get|post' ] ],//添加和编辑客户
'getBroker' => ['api_broker/broker/getBroker',['method'=>'get']],
]); ]);
//Route::miss('api/index/miss');//处理错误的url //Route::miss('api/index/miss');//处理错误的url
\ No newline at end of file
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