作者 lyh

gx

@@ -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']);
@@ -127,7 +127,7 @@ class HrLogic extends BaseLogic @@ -127,7 +127,7 @@ class HrLogic extends BaseLogic
127 DB::beginTransaction(); 127 DB::beginTransaction();
128 try { 128 try {
129 //同步更新管理员手机号码 129 //同步更新管理员手机号码
130 - $managerModel->edit(['mobile'=>$this->param['mobile']],['id'=>$hrInfo['manage_id']]); 130 + $managerModel->edit(['mobile'=>$this->param['mobile'],'status'=>$this->param['status']],['id'=>$hrInfo['manage_id']]);
131 $this->model->edit($this->param,['id'=>$this->param['id']]); 131 $this->model->edit($this->param,['id'=>$this->param['id']]);
132 //同步到B端演示项目 132 //同步到B端演示项目
133 $this->syncBProjectUser($hrInfo['mobile'], $this->param['mobile'], $this->param['name'], $this->param['status']); 133 $this->syncBProjectUser($hrInfo['mobile'], $this->param['mobile'], $this->param['name'], $this->param['status']);