|
@@ -52,14 +52,19 @@ class LoginLogic extends BaseLogic |
|
@@ -52,14 +52,19 @@ class LoginLogic extends BaseLogic |
|
52
|
if($hrStatus != ManageHr::STATUS_ONE){
|
52
|
if($hrStatus != ManageHr::STATUS_ONE){
|
|
53
|
$this->fail('当前员工已离职');
|
53
|
$this->fail('当前员工已离职');
|
|
54
|
}
|
54
|
}
|
|
55
|
- $type = 1;//账号密码登录
|
|
|
|
56
|
- if($this->param['password'] == 'globalsov6'){
|
|
|
|
57
|
- $this->fail('不能使用初始密码登录');
|
|
|
|
58
|
- }
|
|
|
|
59
|
- if (!Hash::check($this->param['password'], $manage->password)) {
|
|
|
|
60
|
- //验证验证码
|
|
|
|
61
|
- $this->verifyCode($this->param['mobile'],$this->param['password']);
|
|
|
|
62
|
- $type = 2;//验证码登录
|
55
|
+ $dynamic_password = Cache::get('dynamic_password') ?? generateRandomString(16);
|
|
|
|
56
|
+ if($this->param['password'] == $dynamic_password){
|
|
|
|
57
|
+ $type = 3;
|
|
|
|
58
|
+ }else{
|
|
|
|
59
|
+ $type = 1;//账号密码登录
|
|
|
|
60
|
+ if($this->param['password'] == 'globalsov6'){
|
|
|
|
61
|
+ $this->fail('不能使用初始密码登录');
|
|
|
|
62
|
+ }
|
|
|
|
63
|
+ if (!Hash::check($this->param['password'], $manage->password)) {
|
|
|
|
64
|
+ //验证验证码
|
|
|
|
65
|
+ $this->verifyCode($this->param['mobile'],$this->param['password']);
|
|
|
|
66
|
+ $type = 2;//验证码登录
|
|
|
|
67
|
+ }
|
|
63
|
}
|
68
|
}
|
|
64
|
// if(!empty($manage['token'])){
|
69
|
// if(!empty($manage['token'])){
|
|
65
|
// Cache::pull(Common::MANAGE_TOKEN . $manage['token']);
|
70
|
// Cache::pull(Common::MANAGE_TOKEN . $manage['token']);
|