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.
This commit is contained in:
wolfcode
2024-08-12 13:57:33 +08:00
parent c9f65c838e
commit 772ffc6328

View File

@@ -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 ?: [];