From 772ffc6328227ddd9e157e93aee0e3caba07d18e Mon Sep 17 00:00:00 2001 From: wolfcode <37436228+wolf-leo@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:57:33 +0800 Subject: [PATCH] fix(admin): correct admin login page redirect After the admin session expires, the system now correctly redirects to the specified admin login URL, addressing the issue where the redirect would sometimes point to an incorrect path. --- app/admin/middleware/CheckLogin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/middleware/CheckLogin.php b/app/admin/middleware/CheckLogin.php index b579e2e..cdbdbb8 100644 --- a/app/admin/middleware/CheckLogin.php +++ b/app/admin/middleware/CheckLogin.php @@ -37,7 +37,7 @@ class CheckLogin $expireTime = $adminUserInfo['expire_time']; if ($expireTime !== true && time() > $expireTime) { session('admin', null); - $this->error('登录已过期,请重新登录', [], __url('admin/login/index')); + $this->error('登录已过期,请重新登录', [], __url(env('EASYADMIN.ADMIN') . '/login/index')); } } $request->adminUserInfo = $adminUserInfo ?: [];