diff --git a/app/admin/middleware/CheckToken.php b/app/admin/middleware/CheckToken.php index 04f9a079be53af7e0adf46ca354ccd6d398c7a7a..a4e2ffd16d6a1f4cdccebb52e2dc1656f6d109a7 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 +}