fix: 修正中间件、弹窗关闭流程

This commit is contained in:
Ying
2022-08-31 16:19:27 +08:00
parent bc48853cf5
commit c8c3acbbf7
2 changed files with 12 additions and 12 deletions

View File

@@ -37,6 +37,9 @@ class IndexInitialize implements MiddlewareInterface
*/
public function process(Request $request, callable $handler): Response
{
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');
@@ -46,9 +49,6 @@ class IndexInitialize implements MiddlewareInterface
} catch (\Throwable $th) {
return \response('Web site has been closed', 503);
}
if (!is_file(root_path('extend/conf').'install.lock')) {
return redirect('/install/index');
}
$siteInfo = saenv('site', true);

View File

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