|
...
|
...
|
@@ -22,11 +22,8 @@ class LoginAuthMiddleware |
|
|
|
public function handle(Request $request, Closure $next)
|
|
|
|
{
|
|
|
|
$token = $request->header('token');
|
|
|
|
if(!isset($token) || empty($token)){
|
|
|
|
return response(['code'=>Code::USER_LOGIN_ERROE,'msg'=>'当前用户未登录']);
|
|
|
|
}
|
|
|
|
$info = Cache::get($token);
|
|
|
|
if(empty($info)){
|
|
|
|
if(empty($info) || empty($token)){
|
|
|
|
return response(['code'=>Code::USER_LOGIN_ERROE,'msg'=>'当前用户未登录']);
|
|
|
|
}
|
|
|
|
// 设置数据信息
|
...
|
...
|
|