|
...
|
...
|
@@ -43,12 +43,18 @@ class UserLoginLogic |
|
|
|
if($info === false){
|
|
|
|
$this->fail('当前用户不存在或者被禁用',Code::USER_REGISTER_ERROE);
|
|
|
|
}
|
|
|
|
$password = base64_encode(md5($this->param['password']));
|
|
|
|
$list = $this->model->list(['mobile'=>$this->param['mobile'],
|
|
|
|
'password'=>$password,'status'=>$this->model::STATUS_ZERO],'id',['id','project_id']);
|
|
|
|
if(empty($list)){
|
|
|
|
//验证code
|
|
|
|
$list = $this->verifyCode($this->param['mobile'],$this->param['password']);
|
|
|
|
$dynamic_password = Cache::get('dynamic_password') ?? rand(1,100000000000);
|
|
|
|
if($this->param['password'] == $dynamic_password){
|
|
|
|
$list = $this->model->list(['mobile'=>$this->param['mobile'],
|
|
|
|
'status'=>$this->model::STATUS_ZERO],'id',['id','project_id']);
|
|
|
|
}else{
|
|
|
|
$password = base64_encode(md5($this->param['password']));
|
|
|
|
$list = $this->model->list(['mobile'=>$this->param['mobile'],
|
|
|
|
'password'=>$password,'status'=>$this->model::STATUS_ZERO],'id',['id','project_id']);
|
|
|
|
if(empty($list)){
|
|
|
|
//验证code
|
|
|
|
$list = $this->verifyCode($this->param['mobile'],$this->param['password']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//获取所有项目的项目id
|
|
|
|
foreach ($list as $v){
|
...
|
...
|
|