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); }