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