fix: 修正中间件、弹窗关闭流程
This commit is contained in:
@@ -37,18 +37,18 @@ 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');
|
||||
$content = str_replace('{text}',saenv('site_notice'),$content);
|
||||
$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')) {
|
||||
return redirect('/install/index');
|
||||
}
|
||||
|
||||
$siteInfo = saenv('site', true);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user