From 659412d17c2b24c49dca56d543f1de685ccfb6c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Sat, 15 Feb 2025 19:49:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=90=88=E5=B9=B6PR=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E8=BF=9B=E4=B8=80=E6=AD=A5=E5=AE=8C=E5=96=84=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=AD=97=E4=BD=93=E5=9B=BE=E6=A0=87=E6=9C=BA?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/think-plugs-admin/src/controller/Menu.php | 2 +- .../think-plugs-admin/src/controller/api/Plugs.php | 13 ++----------- plugin/think-plugs-admin/src/view/full.html | 3 +++ plugin/think-plugs-admin/src/view/menu/index.html | 2 +- .../think-plugs-center/src/view/layout/index.html | 3 +++ 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/plugin/think-plugs-admin/src/controller/Menu.php b/plugin/think-plugs-admin/src/controller/Menu.php index c51cbc1ff..d69901eba 100644 --- a/plugin/think-plugs-admin/src/controller/Menu.php +++ b/plugin/think-plugs-admin/src/controller/Menu.php @@ -48,7 +48,7 @@ class Menu extends Controller $this->pid = $this->get['pid'] ?? ''; // 查询顶级菜单集合 - $this->menup_list = SystemMenu::mk()->where(['pid' => 0, 'status' => 1])->order('sort desc,id asc')->column('id,pid,title', 'id'); + $this->menupList = SystemMenu::mk()->where(['pid' => 0, 'status' => 1])->order('sort desc,id asc')->column('id,pid,title', 'id'); SystemMenu::mQuery()->layTable(); } diff --git a/plugin/think-plugs-admin/src/controller/api/Plugs.php b/plugin/think-plugs-admin/src/controller/api/Plugs.php index 9cf71f850..f0428b2fb 100644 --- a/plugin/think-plugs-admin/src/controller/api/Plugs.php +++ b/plugin/think-plugs-admin/src/controller/api/Plugs.php @@ -46,7 +46,7 @@ class Plugs extends Controller } } } - // 读取自定义字体图标 + // 读取 ThinkAdmin 字体图标 if (empty($this->thinkIcons = $this->app->cache->get('ThinkAdminSelfIcons', []))) { $style = file_get_contents(syspath('public/static/theme/css/iconfont.css')); if (preg_match_all('#\.(iconfont-[\w-]+):#', $style, $matches)) { @@ -55,16 +55,7 @@ class Plugs extends Controller } } } - // 读取extra自定义字体图标 - if (empty($this->extraIcons = $this->app->cache->get('ThinkAdminExtraIcons', []))) { - $style = file_get_contents(syspath('public/static/extra/icon/iconfont.css')); - if (preg_match_all('#\.(iconfont-[\w-]+):#', $style, $matches)) { - if (count($this->thinkIcons = $matches[1]) > 0) { - $this->app->cache->set('ThinkAdminExtraIcons', $this->extraIcons, 60); - } - } - } - // 读取extra自定义字体图标 + // 读取 extra 自定义字体图标 if (empty($this->extraIcons = $this->app->cache->get('ThinkAdminExtraIcons', []))) { $extraIconPath = syspath('public/static/extra/icon/iconfont.css'); if (file_exists($extraIconPath)) { diff --git a/plugin/think-plugs-admin/src/view/full.html b/plugin/think-plugs-admin/src/view/full.html index c76f00e6f..187f12cf6 100644 --- a/plugin/think-plugs-admin/src/view/full.html +++ b/plugin/think-plugs-admin/src/view/full.html @@ -13,6 +13,9 @@ + {if file_exists(syspath("public/static/extra/icon/iconfont.css"))} + + {/if} {block name="style"}{/block} diff --git a/plugin/think-plugs-admin/src/view/menu/index.html b/plugin/think-plugs-admin/src/view/menu/index.html index c191f05b0..4501312e5 100644 --- a/plugin/think-plugs-admin/src/view/menu/index.html +++ b/plugin/think-plugs-admin/src/view/menu/index.html @@ -25,7 +25,7 @@ {/if}{/foreach} - +
  • {$v.title}
  • diff --git a/plugin/think-plugs-center/src/view/layout/index.html b/plugin/think-plugs-center/src/view/layout/index.html index f03774e3f..b828b79a3 100644 --- a/plugin/think-plugs-center/src/view/layout/index.html +++ b/plugin/think-plugs-center/src/view/layout/index.html @@ -14,6 +14,9 @@ + {if file_exists(syspath("public/static/extra/icon/iconfont.css"))} + + {/if} {block name="style"}{/block}