Commit 8d8a30c1 authored by clone's avatar clone

后台列表

parent d84dddff
...@@ -23,6 +23,7 @@ namespace app\index\controller; ...@@ -23,6 +23,7 @@ namespace app\index\controller;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\model\AAgents; use app\model\AAgents;
use app\model\ABindingDevice;
use app\model\Agents; use app\model\Agents;
use app\model\AStore; use app\model\AStore;
use app\model\Regions; use app\model\Regions;
...@@ -111,6 +112,29 @@ class Agent extends Basic ...@@ -111,6 +112,29 @@ class Agent extends Basic
return $this->response(200, '成功', $data); return $this->response(200, '成功', $data);
} }
/**
* 经纪人设备绑定列表
* @return \think\Response
*/
public function deviceList()
{
$agent_id = $this->request->param("agent_id");
if (!$agent_id) {
return $this->response(101, '经纪人id不能为空');
}
$aBD = new ABindingDevice();
$params["agent_id"] = $agent_id;
$field = "id,agent_id,device_id,model,is_forbidden,create_time,update_time";
$result = $aBD->getDeviceByAgentId($params,$field);
if(count($result) > 0){
return $this->response("200","success",$result);
}else{
return $this->response("101","此账号未绑定过设备");
}
}
/** /**
* 新增or修改or查看 * 新增or修改or查看
* $group_id !=0为查看 * $group_id !=0为查看
......
...@@ -139,6 +139,7 @@ Route::group('index', [ ...@@ -139,6 +139,7 @@ Route::group('index', [
'saveAgent' => [ 'index/agent/saveAgent', [ 'method' => 'get|post' ] ], //修改经纪人【接口】 'saveAgent' => [ 'index/agent/saveAgent', [ 'method' => 'get|post' ] ], //修改经纪人【接口】
'updateStatus' => [ 'index/agent/updateStatus', [ 'method' => 'post' ] ], //状态修改【接口】 'updateStatus' => [ 'index/agent/updateStatus', [ 'method' => 'post' ] ], //状态修改【接口】
'updateRole' => [ 'index/agent/updateRole', [ 'method' => 'post' ] ], //经纪人角色修改【接口】 'updateRole' => [ 'index/agent/updateRole', [ 'method' => 'post' ] ], //经纪人角色修改【接口】
'deviceList' => [ 'index/agent/deviceList', [ 'method' => 'post|get' ] ], //经纪人设备id绑定列表
//客户标签 //客户标签
'getULabelsList' => [ 'index/label/getULabelsList', [ 'method' => 'get' ] ], //客户标签列表接口/界面 'getULabelsList' => [ 'index/label/getULabelsList', [ 'method' => '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