Commit 33c304d1 authored by zhuwei's avatar zhuwei

1

parent 7dea144d
......@@ -50,10 +50,12 @@ class BrokerService
"is_pc" => $is_pc ]);
return true;
}
$is_exits = false;
foreach ($result as $item) {
//如果是客户端登录
if($is_pc == 2){
if ($device_id == $item["device_id"])
{
if ($item["is_forbidden"] == 0) {
......
......@@ -185,5 +185,6 @@ function del_array_string($string = '', $array_str = []) {
*/
function big_log($content){
$filename = ROOT_PATH.'runtime/log/find_bug.log';
$content = '['.date("Y-m-d H:i:s", time()).'] '.$content;
file_put_contents($filename, $content."\r\n", FILE_APPEND);
}
\ No newline at end of file
......@@ -57,7 +57,6 @@ class Login extends Basic
$model = $this->params["model"];
$only_id = $this->params["only_id"];
$mac_address = $this->params["mac_address"];
if (empty($name) || empty($password)) {
return $this->response(101, '用户名或密码不能为空');
}
......@@ -97,9 +96,11 @@ class Login extends Basic
//判断设备id是否存在
if($mac_address){
$is_pc = 2;//客户端
$last_login_ip = $mac_address;//device_id存MAC地址
}else{
$is_pc = 1;//浏览器
}
$is_login = $this->brokerService->judgeBand($last_login_ip, $user_data['id'], $model, 0,$only_id , $is_pc);
if (!$is_login) {
return $this->response("102", "该账号没有绑定该设备的浏览器,请先向店长申请,由店长致电财务董飞。");
......
......@@ -92,7 +92,6 @@ class ABindingDevice extends BaseModel
} catch (\Exception $e) {
$data = [];
}
return $data;
}
......
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