Commit ef8ce24f authored by clone's avatar clone

解绑

parent 8d8a30c1
...@@ -27,6 +27,7 @@ use app\model\ABindingDevice; ...@@ -27,6 +27,7 @@ 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;
use think\Exception;
use think\Session; use think\Session;
use think\Db; use think\Db;
...@@ -135,6 +136,38 @@ class Agent extends Basic ...@@ -135,6 +136,38 @@ class Agent extends Basic
} }
} }
/**
* 绑定或者解绑
* @return \think\Response
*/
public function updateDevice()
{
$params = $this->request->param();
/* $params = array(
"agent_id" => 1,//解绑或者绑定的经纪人id
"id" => 1, //关系id
"operator_id" => 12,//操作人id 登陆后台的经纪人id
"is_forbidden" => 0,//0正常 1禁止
);*/
$checkResult = $this->validate($params, "PerformanceValidate.verifyIsForbidden");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$aBD = new ABindingDevice();
try {
$id = $aBD->updateDevice($params);
if ($id > 0) {
return $this->response("200", "update success", [ "id" => $id ]);
} else {
return $this->response("101", "请求异常");
}
} catch (Exception $exception) {
return $this->response("101", "请求错误:" . $exception);
}
}
/** /**
* 新增or修改or查看 * 新增or修改or查看
* $group_id !=0为查看 * $group_id !=0为查看
......
...@@ -139,7 +139,8 @@ Route::group('index', [ ...@@ -139,7 +139,8 @@ 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绑定列表 'deviceList' => [ 'index/agent/deviceList', [ 'method' => 'post|get' ] ], //经纪人设备id绑定列表
'updateDevice' => [ 'index/agent/updateDevice', [ 'method' => 'post|get' ] ],//解绑或绑定经纪人设备id
//客户标签 //客户标签
'getULabelsList' => [ 'index/label/getULabelsList', [ 'method' => 'get' ] ], //客户标签列表接口/界面 'getULabelsList' => [ 'index/label/getULabelsList', [ 'method' => 'get' ] ], //客户标签列表接口/界面
...@@ -374,10 +375,10 @@ Route::group('broker', [ ...@@ -374,10 +375,10 @@ Route::group('broker', [
'statusBargain' => [ 'api_broker/OrderLog/statusBargain', [ 'method' => 'get|post' ] ], 'statusBargain' => [ 'api_broker/OrderLog/statusBargain', [ 'method' => 'get|post' ] ],
'getIsAccountStatement' => [ 'api_broker/OrderLog/getIsAccountStatement', [ 'method' => 'get|post' ] ], 'getIsAccountStatement' => [ 'api_broker/OrderLog/getIsAccountStatement', [ 'method' => 'get|post' ] ],
'login' => [ 'api_broker/Broker/login', [ 'method' => 'post' ] ], //经纪人登陆 废弃 'login' => [ 'api_broker/Broker/login', [ 'method' => 'post' ] ], //经纪人登陆 废弃
'loginV2' => [ 'api_broker/Broker/loginV2', [ 'method' => 'post' ] ], //经纪人登陆 'loginV2' => [ 'api_broker/Broker/loginV2', [ 'method' => 'post' ] ], //经纪人登陆
'verifyAgentStatus' => [ 'api_broker/Broker/verifyAgentStatus', [ 'method' => 'post' ] ], //判断经纪人是否被解绑 'verifyAgentStatus' => [ 'api_broker/Broker/verifyAgentStatus', [ 'method' => 'post' ] ], //判断经纪人是否被解绑
'updateDevice' => [ 'api_broker/Broker/updateDevice', [ 'method' => 'post' ] ], //解绑或者绑定经纪人 'updateDevice' => [ 'api_broker/Broker/updateDevice', [ 'method' => 'post' ] ], //解绑或者绑定经纪人
'editAgent' => [ 'api_broker/Broker/editAgent', [ 'method' => 'post' ] ], //经纪人修改密码 'editAgent' => [ 'api_broker/Broker/editAgent', [ 'method' => 'post' ] ], //经纪人修改密码
'forgetPwd' => [ 'api_broker/Broker/forgetPwd', [ 'method' => 'post' ] ], //经纪人忘记密码 'forgetPwd' => [ 'api_broker/Broker/forgetPwd', [ 'method' => 'post' ] ], //经纪人忘记密码
......
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