From e94d59134b1a6332ad1dbc8923fd0e8eadd5be74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=A8=E6=A0=88=E5=B0=8F=E5=AD=A6=E7=94=9F?= <1518079521@qq.com> Date: Sat, 8 Mar 2025 09:39:06 +0800 Subject: [PATCH] Update Index.php --- niucloud/app/install/controller/Index.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/niucloud/app/install/controller/Index.php b/niucloud/app/install/controller/Index.php index 0f901c260..1f6c65e44 100644 --- a/niucloud/app/install/controller/Index.php +++ b/niucloud/app/install/controller/Index.php @@ -403,10 +403,22 @@ class Index extends BaseInstall $files = get_files_by_dir($addon_path); if (!empty($files)) { + $addon = []; foreach ($files as $path) { $data = ( new CoreAddonService() )->getAddonConfig($path); if (isset($data[ 'key' ])) { - $install_service = ( new CoreAddonInstallService($data[ 'key' ]) ); + if ($data['type'] == 'app') { + $install_service = ( new CoreAddonInstallService($data[ 'key' ]) ); + $install_service->installCheck(); + $install_service->install(); + } else { + $addon[] = $data; + } + } + } + if (!empty($addon)) { + foreach ($addon as $k => $v) { + $install_service = ( new CoreAddonInstallService($v[ 'key' ]) ); $install_service->installCheck(); $install_service->install(); }