From ecc1166f432185b315c567ea394d2922e1cd2232 Mon Sep 17 00:00:00 2001 From: nixing87 Date: Tue, 19 Sep 2023 08:40:39 +0000 Subject: [PATCH] =?UTF-8?q?update=20app/admin/middleware/CheckToken.php.?= =?UTF-8?q?=20session=5Fid=20=20token=20=E6=94=AF=E6=8C=81get=E4=BC=A0?= =?UTF-8?q?=E9=80=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nixing87 --- app/admin/middleware/CheckToken.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/admin/middleware/CheckToken.php b/app/admin/middleware/CheckToken.php index 04f9a079..a4e2ffd1 100644 --- a/app/admin/middleware/CheckToken.php +++ b/app/admin/middleware/CheckToken.php @@ -33,6 +33,17 @@ class CheckToken{ $token=$request->header('token'); $session_id=$request->post('session_id',''); + + + + if (!$token) { + $token = $request->get('token', ''); + } + + if (!$session_id) { + $session_id = $request->get('session_id', ''); + } + if(empty($session_id)||empty($token)){ return jsonResult(402, "用户未登录", []); @@ -67,4 +78,4 @@ class CheckToken{ } } -} \ No newline at end of file +} -- Gitee