|
@@ -823,11 +823,16 @@ class EmployeeService extends Service
|
|
if($this->isEmpty($data,'account')) return [false,'账号不能为空!'];
|
|
if($this->isEmpty($data,'account')) return [false,'账号不能为空!'];
|
|
if($this->isEmpty($data,'password')) return [false,'密码不存在!'];
|
|
if($this->isEmpty($data,'password')) return [false,'密码不存在!'];
|
|
|
|
|
|
|
|
+ $account = $data['account'];
|
|
$res = Employee::where('del_time',0)
|
|
$res = Employee::where('del_time',0)
|
|
- ->where('account', $data['account'])
|
|
|
|
|
|
+ ->where(function ($query)use($account) {
|
|
|
|
+ $query->where('account', $account)
|
|
|
|
+ ->orWhere('mobile', $account);
|
|
|
|
+ })
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
|
|
|
|
if(empty($res)) return [false,'账号不存在或已被删除!'];
|
|
if(empty($res)) return [false,'账号不存在或已被删除!'];
|
|
|
|
+ if(count($res) > 1) return [false,'该手机号检测出多个账户,请联系后台!'];
|
|
|
|
|
|
$res = reset($res);
|
|
$res = reset($res);
|
|
if(! Hash::check($data['password'], $res['password'])) return [false,'密码错误!'];
|
|
if(! Hash::check($data['password'], $res['password'])) return [false,'密码错误!'];
|