|
@@ -578,12 +578,17 @@ class LoginController extends AbstractController
|
|
|
|
|
|
// 获取所有 Cookie
|
|
// 获取所有 Cookie
|
|
$cookies = $this->request->getCookieParams();
|
|
$cookies = $this->request->getCookieParams();
|
|
- foreach ($cookies as $name => $value) {
|
|
|
|
- $expire = time() - 3600; // 设置过期时间为过去的时间
|
|
|
|
- $cookie = new Cookie($name, '', $expire, '/');
|
|
|
|
- $this->response = $this->response->withCookie($cookie);
|
|
|
|
- }
|
|
|
|
|
|
+ var_dump("获取cookie:", $cookies);
|
|
|
|
+ if($cookies){
|
|
|
|
+ foreach ($cookies as $name => $value) {
|
|
|
|
+ if($name){
|
|
|
|
+ $expire = time() - 3600; // 设置过期时间为过去的时间
|
|
|
|
+ $cookie = new Cookie($name, '', $expire, '/');
|
|
|
|
+ $this->response = $this->response->withCookie($cookie);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
try {
|
|
try {
|
|
$jwt->logout($reqData['admintoken']);
|
|
$jwt->logout($reqData['admintoken']);
|
|
} catch (\Exception $e) {
|
|
} catch (\Exception $e) {
|