From 42bd496675a0ec433f0a1ddb7899b5ed7c3da277 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Fri, 25 Feb 2022 14:28:09 +0800 Subject: [PATCH] setter --- app/middleware/ApiLogin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);