作者 lyh

gx

... ... @@ -149,7 +149,7 @@ class BaseController extends Controller
//生成日志
$log = config('logging.operator_log');
if(isset($log) && $log['log'] == true){
if(empty($log['action']) || (strpos($log['action'],$this->request->route()->getName()) < 0)){
if(empty($log['action']) || (strpos($log['action'],$this->request->route()->getName()) === false)){
Common::set_user_log(['model'=>$this->request->route()->getName(),'remark'=>'请求的参数:param = '.json_encode($this->param),'operator_id'=>$this->uid]);
}
}
... ...
... ... @@ -54,7 +54,7 @@ class ComController extends BaseController
*/
public function autologin(UserLoginLogic $logic, EncryptUtils $encrypt)
{
$data = $encrypt->authcode($this->param['code'], 'DECODE', 'autologin');
$data = $encrypt->unlock_url($this->param['code'], 'v6.globalso.com');
$data = json_decode($data, true);
if(empty($data['project_id'])){
$this->response('无效Code',Code::USER_ERROR);
... ...
... ... @@ -88,7 +88,7 @@ class LoginLogic extends BaseLogic
$encrypt = new EncryptUtils();
$data = [
'domain'=>$info['values'],
'autologin_code' => $encrypt->authcode(json_encode(['project_id' => $this->param['project_id']]), 'ENCODE', 'autologin', 3600),
'autologin_code' => $encrypt->lock_url(json_encode(['project_id'=>$this->param['project_id']]),'v6.globalso.com'),
'remark'=>'自动登录地址和code',
];
//获取当前超级管理员的token
... ...
... ... @@ -76,6 +76,7 @@ class UserLoginLogic
$token = md5(uniqid().$info['id']);
//存储缓存
$info['token'] = $token;
$info['type'] = 1;//代表自动登录写入日志
Cache::add($token,$info,3600);
}
Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(),'project_id'=>$info['project_id'], 'remark' => '自动登录']);
... ...