|
@@ -19,9 +19,7 @@ class CheckLogin
|
|
|
public function handle($request, Closure $next)
|
|
|
{
|
|
|
$token=$request->header('Authorization');
|
|
|
- if (!isset($token)){
|
|
|
- return response()->json(['code'=>1,'msg'=>'缺少token','data'=>null]);
|
|
|
- }
|
|
|
+ if (empty($token)) return response()->json(['code'=>1,'msg'=>'缺少登录凭证','data'=>null]);
|
|
|
|
|
|
//校验token
|
|
|
$result = TokenService::verifyToken($token);
|