From ddd01c6f46e753e29e0fee255164872556bce152 Mon Sep 17 00:00:00 2001 From: Anyon Date: Thu, 21 Apr 2022 15:35:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20uris=20=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=EF=BC=8C=E9=9C=80=E8=A6=81=E6=9B=B4=E6=96=B0=20Library?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Login.php | 11 +++++------ config/view.php | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/admin/controller/Login.php b/app/admin/controller/Login.php index 22a69f884..a4f5b4a74 100644 --- a/app/admin/controller/Login.php +++ b/app/admin/controller/Login.php @@ -43,7 +43,6 @@ class Login extends Controller if (AdminService::instance()->isLogin()) { $this->redirect(sysuri('admin/index/index')); } else { - // 登录验证码 $this->captchaType = 'LoginCaptcha'; $this->captchaToken = CodeExtend::uniqidDate(18); @@ -52,18 +51,18 @@ class Login extends Controller $this->developMode = $system->checkRunMode(); // 后台背景处理 $images = str2arr(sysconf('login_image') ?: '', '|') ?: [ - $system->paths('/static/theme/img/login/bg1.jpg')['__ROOT__'], - $system->paths('/static/theme/img/login/bg2.jpg')['__ROOT__'], + $system->uri('/static/theme/img/login/bg1.jpg'), + $system->uri('/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()}"; if ($host !== sysconf('base.site_host')) sysconf('base.site_host', $host); - // 标记登录验证令牌 + // 标记验证令牌 if (!$this->app->session->get('LoginInputSessionError')) { $this->app->session->set($this->captchaType, $this->captchaToken); } - // 加载显示登录模板 + // 加载登录模板 $this->title = '系统登录'; $this->fetch(); } diff --git a/config/view.php b/config/view.php index ae4c45043..92b4995bd 100644 --- a/config/view.php +++ b/config/view.php @@ -42,5 +42,5 @@ return [ // 标签默认过滤输出方法 'default_filter' => 'htmlentities=###,ENT_QUOTES', // 定义模板替换字符串 - 'tpl_replace_string' => SystemService::instance()->paths(), + 'tpl_replace_string' => SystemService::instance()->uris(), ]; \ No newline at end of file