|
...
|
...
|
@@ -22,10 +22,8 @@ class UserLoginLogic |
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
//验证账号密码
|
|
|
|
$this->param = request()->all();
|
|
|
|
$this->model = new User();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -86,7 +84,6 @@ class UserLoginLogic |
|
|
|
if(isset($info['token']) && !empty($info['token'])){
|
|
|
|
//清除上一次用户缓存
|
|
|
|
Cache::pull($info['token']);
|
|
|
|
Cache::pull('login-project-'.$this->param['mobile']);
|
|
|
|
}
|
|
|
|
//生成新token
|
|
|
|
$token = md5(uniqid().$info['id']);
|
|
...
|
...
|
@@ -178,7 +175,7 @@ class UserLoginLogic |
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :组装返回数据
|
|
|
|
* @name :getProjectInfo
|
|
|
|
* @name :assembleParam
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/29 15:26
|
|
...
|
...
|
@@ -343,10 +340,7 @@ class UserLoginLogic |
|
|
|
public function wechatLogin($wechat){
|
|
|
|
$info = $this->model->read(['wechat'=>$wechat]);
|
|
|
|
if($info === false){
|
|
|
|
$data = [
|
|
|
|
'code'=>0,
|
|
|
|
'message'=>'当前用户未绑定账户,请绑定后登录',
|
|
|
|
];
|
|
|
|
$data = ['code'=>0, 'message'=>'当前用户未绑定账户,请绑定后登录',];
|
|
|
|
}else {
|
|
|
|
//获取项目详情
|
|
|
|
$info = $this->autoAssembleParam($info,User::LOGIN_PASSWORD_SOURCE);
|
|
...
|
...
|
@@ -366,8 +360,7 @@ class UserLoginLogic |
|
|
|
'message'=>'登陆成功',
|
|
|
|
'data'=>$info
|
|
|
|
];
|
|
|
|
Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(),
|
|
|
|
'project_id'=>$info['project_id'], 'type'=>2 ,'remark' => '自动登录,用户微信扫码']);
|
|
|
|
Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(), 'project_id'=>$info['project_id'], 'type'=>2 ,'remark' => '自动登录,用户微信扫码']);
|
|
|
|
}
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
...
|
...
|
|