From 6520e95c9fa3c782d962dc477e6455255dbac73c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=81=E7=81=AB=E8=A1=8C=E8=80=85?= Date: Tue, 19 Oct 2021 15:51:07 +0800 Subject: [PATCH 1/2] bug fix --- src/Common/Utils.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Common/Utils.php b/src/Common/Utils.php index 69541a5..1d0adc3 100644 --- a/src/Common/Utils.php +++ b/src/Common/Utils.php @@ -233,10 +233,7 @@ class Utils 'routes' => $routesPath ]; } - - if (isset($config['app_id']) && $config['app_id'] != '6130acd182770') { - $plugins[$config['app_id']] = $config; - } + $plugins[$config['app_id']] = $config; } DzqCache::set(CacheKey::PLUGIN_LOCAL_CONFIG, $plugins, 5 * 60); return $plugins; -- Gitee From df0e597879c1571e91c0e6a06649a770b2600b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=81=E7=81=AB=E8=A1=8C=E8=80=85?= Date: Tue, 19 Oct 2021 16:09:41 +0800 Subject: [PATCH 2/2] bug fix --- src/Common/Utils.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Common/Utils.php b/src/Common/Utils.php index 1d0adc3..46512de 100644 --- a/src/Common/Utils.php +++ b/src/Common/Utils.php @@ -208,16 +208,21 @@ class Utils foreach ($subPlugins as $item) { $filename = strtolower($item->getFilenameWithoutExtension()); $fileVar = $filename . 'Path'; + $pathName = $item->getPathname(); if ($filename == 'routes') { - $routesPath = $item->getPathname(); + $routesPath = $pathName; $routeFiles = Finder::create()->in($routesPath)->path('/.*\.php/')->files(); $routesPath = []; foreach ($routeFiles as $routeFile) { $routesPath[] = $routeFile->getPathname(); } } else { - if (!(isset($$fileVar) && Str::endsWith($$fileVar, 'config.json'))) { - $$fileVar = $item->getPathname(); + if ($filename == 'config') { + if (strtolower($item->getExtension()) == 'json') { + $$fileVar = $pathName; + } + } else { + $$fileVar = $pathName; } } } -- Gitee