作者 lyh

gx

... ... @@ -65,7 +65,6 @@ class LoginController extends BaseController
}
$data = $encrypt->unlock_url($this->param['code'], $info['values']);
$data = json_decode($data, true);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($data, true) . PHP_EOL, FILE_APPEND);
if(!isset($data['project_id']) && !isset($data['user_id'])){
$this->response('无效Code',Code::USER_ERROR);
}
... ...
... ... @@ -22,7 +22,9 @@ class LoginAuthMiddleware
*/
public function handle(Request $request, Closure $next)
{
@file_put_contents(storage_path('logs/lyh_error.log'), var_export(1111, true) . PHP_EOL, FILE_APPEND);
$token = $request->header('token');
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($token, true) . PHP_EOL, FILE_APPEND);
$info = Cache::get($token);
if(empty($info) || empty($token)){
return response(['code'=>Code::USER_LOGIN_ERROE,'msg'=>'当前用户未登录']);
... ...