From bcb96cd3c40f8fa807f549b3a9c6c19064bf23b6 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Mon, 12 Oct 2020 14:00:40 +0800 Subject: [PATCH] =?UTF-8?q?update:=E6=9B=B4=E6=96=B0=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catch/system/controller/Module.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/catch/system/controller/Module.php b/catch/system/controller/Module.php index 1b923c4..4ca9678 100644 --- a/catch/system/controller/Module.php +++ b/catch/system/controller/Module.php @@ -1,6 +1,7 @@ user()->getPermissionsBy())->column('module')); + $orders = array_column($modules, 'order'); array_multisort($orders, SORT_DESC, $modules); - return CatchResponse::success($modules); - } + foreach ($modules as $k => $module) { + if (!in_array($module['alias'], $hasModules)) { + unset($modules[$k]); + } + } + return CatchResponse::success(array_values($modules)); + } /** * 禁用/启用模块