Commit 4469ffa6 authored by hujun's avatar hujun

获取经纪人列表

parent e2bd8d3f
......@@ -99,7 +99,7 @@ class Broker extends Basic{
$evaluate = new Evaluate();
$evaluate->save([
'user_id' => $params['user_id'],
'user_id' => $this->userId,
'agents_id' => $params['agents_id'],
'source' => $params['source'],
'record_id' => $params['record_id'],
......
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2017/12/22
* Time: 14:44
*/
namespace app\index\controller;
use app\index\extend\Basic;
use app\model\Agents;
class Broker extends Basic
{
/**
* 获取经纪人列表
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getBroker() {
$data['status'] = 200;
$data['data'] = '';
$data['code'] = '';
$data['msg'] = '';
$house_id = $this->request->param('house_id');
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
if ($house_id) {
$agent = new Agents();
$field = 'father_id,realname,phone';
$params = '';
$data['data'] = $agent->getAgents($pageNo, $pageSize, '', $field, $params, $house_id);
} else {
$data['msg'] = '没有该楼盘信息';
}
return $this->response($data['status'], $data['msg'], $data['data']);
}
}
\ 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