From 44067eab90c799f4c319d1cf5fe9844b13b85176 Mon Sep 17 00:00:00 2001 From: Anyon Date: Thu, 21 Apr 2022 11:46:51 +0800 Subject: [PATCH] Update Login.php --- app/admin/controller/Login.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/admin/controller/Login.php b/app/admin/controller/Login.php index 793c6a450..ef8693fb9 100644 --- a/app/admin/controller/Login.php +++ b/app/admin/controller/Login.php @@ -47,9 +47,10 @@ class Login extends Controller $this->captchaType = 'LoginCaptcha'; $this->captchaToken = CodeExtend::uniqidDate(18); $this->developMode = SystemService::instance()->checkRunMode(); + // 后台背景处理 - $bgImages = str2arr(sysconf('login_image') ?: '', '|') ?: ['/static/theme/img/login/bg1.jpg', '/static/theme/img/login/bg2.jpg']; - $this->loginStyle = sprintf('style="background-image:url(%s)" data-bg-transition="%s"', $bgImages[0], join(',', $bgImages)); + $images = str2arr(sysconf('login_image') ?: '', '|') ?: ['/static/theme/img/login/bg1.jpg', '/static/theme/img/login/bg2.jpg']; + $this->loginStyle = sprintf('style="background-image:url(%s)" data-bg-transition="%s"', $images[0], join(',', $images)); // 刷新当前后台域名 $host = "{$this->request->scheme()}://{$this->request->host()}";