优化服务发现

This commit is contained in:
JaguarJack
2020-06-24 09:46:21 +08:00
parent ee04005d69
commit f6783cb13e
2 changed files with 5 additions and 5 deletions

View File

@@ -16,7 +16,7 @@ use think\console\Input;
use think\console\input\Option;
use think\console\Output;
class InstallModuleServiceCommand extends Command
class ModuleServiceDiscoverCommand extends Command
{
protected function configure()
{
@@ -79,13 +79,13 @@ PHP
if ($module) {
$moduleInfo = CatchAdmin::getModuleInfo(CatchAdmin::directory() . $module);
if (isset($moduleInfo['services']) && !empty($moduleInfo['services'])) {
return $moduleInfo['services'];
return $moduleInfo['enable'] ? $moduleInfo['services'] : [];
} else {
return [];
}
}
return CatchAdmin::getServices();
return CatchAdmin::getEnabledService();
}
/**