fix: 修正中间件、弹窗关闭流程
This commit is contained in:
@@ -37,6 +37,9 @@ class IndexInitialize implements MiddlewareInterface
|
|||||||
*/
|
*/
|
||||||
public function process(Request $request, callable $handler): Response
|
public function process(Request $request, callable $handler): Response
|
||||||
{
|
{
|
||||||
|
if (!is_file(root_path('extend/conf') . 'install.lock')) {
|
||||||
|
return redirect('/install/index');
|
||||||
|
} else {
|
||||||
try {
|
try {
|
||||||
if (saenv('site_status')) {
|
if (saenv('site_status')) {
|
||||||
$content = file_get_contents(root_path('extend/conf/tpl') . 'close.tpl');
|
$content = file_get_contents(root_path('extend/conf/tpl') . 'close.tpl');
|
||||||
@@ -46,9 +49,6 @@ class IndexInitialize implements MiddlewareInterface
|
|||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
return \response('Web site has been closed', 503);
|
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);
|
$siteInfo = saenv('site', true);
|
||||||
|
|||||||
@@ -848,7 +848,7 @@ layui.define(['jquery', 'i18n', 'element', 'layer', 'form', 'rate', 'table', 'sl
|
|||||||
location.href = res.url;
|
location.href = res.url;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof (options.close) !== false) {
|
if (options.close) {
|
||||||
admin.event.closeDialog(clickObject);
|
admin.event.closeDialog(clickObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user