diff --git a/app/middleware/ApiLogin.php b/app/middleware/ApiLogin.php index 8c2e174..7f7ad19 100644 --- a/app/middleware/ApiLogin.php +++ b/app/middleware/ApiLogin.php @@ -20,17 +20,17 @@ class ApiLogin return json(['code' => 6001, 'msg' => '登陆失效']); } if (!JwtService::validate($authorization)) { - return json(['code' => 6001, 'msg' => 'token验证失败或已失效']); + return json(['code' => 6001, 'msg' => '登录信息验证失败或已失效']); } $userInfo = $request->user ?? []; if (!isset($userInfo['user_id']) || empty($userInfo['user_id'])) { - return json(['code' => 6001, 'msg' => 'token已失效']); + return json(['code' => 6001, 'msg' => '登录已失效']); } // 自定义过期时间校验。 if(isset($userInfo['expire_time']) && time() >= $userInfo['expire_time']) { - return json(['code' => 6001, 'msg' => 'token已失效']); + return json(['code' => 6001, 'msg' => '登录已失效']); } return $next($request);