Commit bacb4f52 authored by hujun's avatar hujun

获取经纪人有哪些站点的账号

parent d95587d6
......@@ -73,5 +73,29 @@ class Site extends Basic
}
/**
* 获取经纪人有哪些站点的账号
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getAgentSiteListV2()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/*$params = array(
"agent_phone" => "13817616471"
);*/
if(empty($params["agent_phone"]) || empty($params['site_id'])){
return $this->response("101","请求参数错误");
}
$field = 'a.id,a.site_id,b.city';
$get_params['b.is_del'] = 0;
$get_params['a.phone'] = $params["agent_phone"];
$get_params['a.site_id'] = $params["site_id"]; //去除其它城市
$site_city = $this->aAgentModel->getAgentSiteList($get_params, $field);
return $this->response("200", "success", $site_city);
}
}
\ No newline at end of file
......@@ -955,6 +955,7 @@ Route::group('broker', [
'getAgentSiteList' => ['api_broker/Site/getAgentSiteList', ['method' => 'POST|GET']], //获取经纪人站点列表
'getAgentSiteListV2' => ['api_broker/Site/getAgentSiteListV2', ['method' => 'POST|GET']], //获取经纪人站点列表
'getPhoneBook' => ['api_broker/broker/getPhoneBook', ['method' => 'POST|GET']], //消息页面--通讯录
'commentAndDeal' => ['api_broker/broker/commentAndDeal', ['method' => 'get']],//获取当前经纪人的评价和交易列表
'addSpreadUser' => ['api_broker/SpreadUser/addSpreadUser', ['method' => 'POST|GET']],
......
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