From 31a42a5481c9da1f17149e55f827453830e1a979 Mon Sep 17 00:00:00 2001 From: Karson Date: Wed, 14 Jan 2026 19:01:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=98=AF=E5=90=A6=E6=98=BE=E7=A4=BA=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Addon.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/application/admin/controller/Addon.php b/application/admin/controller/Addon.php index 8fc7a886..e3e41031 100644 --- a/application/admin/controller/Addon.php +++ b/application/admin/controller/Addon.php @@ -9,7 +9,7 @@ use think\addons\Service; use think\Cache; use think\Config; use think\Db; -use think\Exception; +use Exception; /** * 插件管理 @@ -38,7 +38,8 @@ class Addon extends Backend $addons = get_addon_list(); foreach ($addons as $k => &$v) { $config = get_addon_config($v['name']); - $v['config'] = $config ? 1 : 0; + $showConfig = $v['config'] ?? true; + $v['config'] = $showConfig && $config ? 1 : 0; $v['url'] = str_replace($this->request->server('SCRIPT_NAME'), '', $v['url']); } $this->assignconfig(['addons' => $addons, 'api_url' => config('fastadmin.api_url'), 'faversion' => config('fastadmin.version'), 'domain' => request()->host(true)]); @@ -444,7 +445,7 @@ class Addon extends Backend $json = []; try { $json = Service::addons($params); - } catch (\Exception $e) { + } catch (Exception $e) { } $rows = $json['rows'] ?? [];