Commit e8f1580d authored by zhuwei's avatar zhuwei

登录

parent 1277ba35
...@@ -38,7 +38,18 @@ class BrokerService ...@@ -38,7 +38,18 @@ class BrokerService
$params["agent_id"] = $agent_id; $params["agent_id"] = $agent_id;
$params["is_pc"] = $is_pc; $params["is_pc"] = $is_pc;
$result = $this->aBD->getDeviceByAgentId($params); $result = $this->aBD->getDeviceByAgentId($params);
if (count($result) <= 0) { if (count($result) <= 0) {
if($is_pc == 2){
//新增申请绑定关系,需要后台同意登陆
$this->aBD->addDevice([ "device_id" => $device_id,
"agent_id" => $agent_id,
"model" => $model,
"push_id" => $push_id,
"is_forbidden" => 1,
"is_pc" => $is_pc ]);
return false;
}
//新增设备绑定关系 默认直接登陆 //新增设备绑定关系 默认直接登陆
if ($type == 0) if ($type == 0)
$this->aBD->addDevice([ "device_id" => $device_id, $this->aBD->addDevice([ "device_id" => $device_id,
......
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