Commit 60fbb168 authored by hujun's avatar hujun

1

parent 90835cbc
......@@ -121,7 +121,8 @@ class Broker extends Basic
"device_id" => "qweqweqweqweqw123123",
"model" => "iphone7",//手机型号
);*/
$status = 1;
$status = 0;
$agents_data = [];
$checkResult = $this->validate($params, "PerformanceValidate.login");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
......@@ -131,22 +132,22 @@ class Broker extends Basic
$where['phone'] = $params['phone'];
$where['id'] = [ '<>', 1 ];
$where['status'] = ['<>', 3];
$agents_data = $this->a_agents->getAgentById($field, $where);
if (count($agents_data) <= 0) {
$agents_data_list = $this->a_agents->getAgentById($field, $where);
if (count($agents_data_list) <= 0) {
return $this->response(101, '没有该用户');
}
foreach ($agents_data as $v) {
foreach ($agents_data_list as $v) {
if ($v['status'] == 0) {
$status = 0;break; //查找正常状态
$status = 1;
$agents_data = $v;
break; //查找正常状态
}
}
if ($status) {
if ($agents_data['status'] == 1 || $agents_data['status'] == 2) {
return $this->response(101, '你目前是长假/离职状态,请联系人事进行更改');
}
}
if ($agents_data['password'] != md5($this->params['pwd'])) {
return $this->response(101, '密码错误');
......
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