From 637aade62a987eb920ab70aa6095c86f71a37dfe Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 28 Jun 2023 12:16:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=8E=B7=E5=8F=96=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E5=88=86=E7=B1=BB=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/attachment/SystemAttachmentCategoryServices.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php b/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php index d46b05aad..01f360b0a 100644 --- a/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php +++ b/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php @@ -77,7 +77,11 @@ class SystemAttachmentCategoryServices extends BaseServices if ($menu['pid'] == $pid) { unset($menusList[$k]); $menu['children'] = $this->tidyMenuTier($menusList, $menu['id']); - if ($menu['children']) $menu['expand'] = true; + if (count($menu['children'])) { + $menu['expand'] = true; + } else { + unset($menu['children']); + } $navList[] = $menu; } }