diff --git a/crmeb/app/services/system/SystemRouteCateServices.php b/crmeb/app/services/system/SystemRouteCateServices.php index b8f25d299..39cec6423 100644 --- a/crmeb/app/services/system/SystemRouteCateServices.php +++ b/crmeb/app/services/system/SystemRouteCateServices.php @@ -69,9 +69,9 @@ class SystemRouteCateServices extends BaseServices * @email 136327134@qq.com * @date 2023/4/6 */ - public function getAllList(string $appName = 'outapi', string $field = '*') + public function getAllList(string $appName = 'outapi', string $field = '*', string $order = '') { - $list = $this->dao->selectList(['app_name' => $appName], $field)->toArray(); + $list = $this->dao->selectList(['app_name' => $appName], $field, 0, 0, $order)->toArray(); return get_tree_children($list); } diff --git a/crmeb/app/services/system/SystemRouteServices.php b/crmeb/app/services/system/SystemRouteServices.php index f11ea60d3..ea641afed 100644 --- a/crmeb/app/services/system/SystemRouteServices.php +++ b/crmeb/app/services/system/SystemRouteServices.php @@ -68,7 +68,9 @@ class SystemRouteServices extends BaseServices throw new ValidateException('修改的路由不存在'); } - return $routeInfo->toArray(); + $routeInfo = $routeInfo->toArray(); + $routeInfo['cate_tree'] = app()->make(SystemRouteCateServices::class)->getAllList($routeInfo['app_name'], '*', 'id asc,sort desc'); + return $routeInfo; } /**