From c8c3acbbf74f49a61d46abb2bd882c6d07d6187a Mon Sep 17 00:00:00 2001 From: Ying Date: Wed, 31 Aug 2022 16:19:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E4=B8=AD=E9=97=B4?= =?UTF-8?q?=E4=BB=B6=E3=80=81=E5=BC=B9=E7=AA=97=E5=85=B3=E9=97=AD=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../middleware/system/IndexInitialize.php | 22 +++++++++---------- public/static/system/module/admin.js | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/index/middleware/system/IndexInitialize.php b/app/index/middleware/system/IndexInitialize.php index 7dd1201..a2bcc39 100644 --- a/app/index/middleware/system/IndexInitialize.php +++ b/app/index/middleware/system/IndexInitialize.php @@ -37,18 +37,18 @@ class IndexInitialize implements MiddlewareInterface */ public function process(Request $request, callable $handler): Response { - try { - if (saenv('site_status')) { - $content = file_get_contents(root_path('extend/conf/tpl') . 'close.tpl'); - $content = str_replace('{text}',saenv('site_notice'),$content); - return \response($content, 503); - } - } catch (\Throwable $th) { - return \response('Web site has been closed', 503); - } - - if (!is_file(root_path('extend/conf').'install.lock')) { + if (!is_file(root_path('extend/conf') . 'install.lock')) { return redirect('/install/index'); + } else { + try { + if (saenv('site_status')) { + $content = file_get_contents(root_path('extend/conf/tpl') . 'close.tpl'); + $content = str_replace('{text}', saenv('site_notice'), $content); + return \response($content, 503); + } + } catch (\Throwable $th) { + return \response('Web site has been closed', 503); + } } $siteInfo = saenv('site', true); diff --git a/public/static/system/module/admin.js b/public/static/system/module/admin.js index 2ac7b24..f1f08e0 100644 --- a/public/static/system/module/admin.js +++ b/public/static/system/module/admin.js @@ -848,7 +848,7 @@ layui.define(['jquery', 'i18n', 'element', 'layer', 'form', 'rate', 'table', 'sl location.href = res.url; } - if (typeof (options.close) !== false) { + if (options.close) { admin.event.closeDialog(clickObject); }