正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -82,7 +82,7 @@ class UserLoginLogic | @@ -82,7 +82,7 @@ class UserLoginLogic | ||
| 82 | $token = md5(uniqid().$info['id']); | 82 | $token = md5(uniqid().$info['id']); |
| 83 | //存储缓存 | 83 | //存储缓存 |
| 84 | $info['token'] = $token; | 84 | $info['token'] = $token; |
| 85 | - Cache::add($token,$info,3600); | 85 | + Cache::add($token,$info,3600 * 6); |
| 86 | //更新用户信息 | 86 | //更新用户信息 |
| 87 | $rs = $this->model->edit(['token'=>$token],['id'=>$info['id']]); | 87 | $rs = $this->model->edit(['token'=>$token],['id'=>$info['id']]); |
| 88 | if($rs === false){ | 88 | if($rs === false){ |
| @@ -121,7 +121,7 @@ class UserLoginLogic | @@ -121,7 +121,7 @@ class UserLoginLogic | ||
| 121 | //存储缓存 | 121 | //存储缓存 |
| 122 | $info['token'] = $token; | 122 | $info['token'] = $token; |
| 123 | $info['manager_id'] = $data['manager_id'];//代表自动登录写入日志 | 123 | $info['manager_id'] = $data['manager_id'];//代表自动登录写入日志 |
| 124 | - Cache::add($token,$info,3600); | 124 | + Cache::add($token,$info,3600 * 6); |
| 125 | } | 125 | } |
| 126 | Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(), | 126 | Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(), |
| 127 | 'project_id'=>$info['project_id'], 'type'=>1 ,'remark' => '自动登录,操作管理员为:'.$data['manager_id']]); | 127 | 'project_id'=>$info['project_id'], 'type'=>1 ,'remark' => '自动登录,操作管理员为:'.$data['manager_id']]); |
-
请 注册 或 登录 后发表评论