getBottomList($params); $apps = ( new CoreAddonService() )->getList([ [ 'type', '=', 'app' ] ]); $bottom_list_keys = array_column($list, 'key'); // 排除没有底部导航的应用 foreach ($apps as $k => $v) { if (!in_array($v[ 'key' ], $bottom_list_keys)) { unset($apps[ $k ]); } } $apps = array_values($apps); // 单应用,排除 系统 底部导航设置 if (count($list) > 1 && count($apps) == 1) { foreach ($list as $k => $v) { if ($v[ 'key' ] = 'app') { unset($list[ $k ]); break; } } $list = array_values($list); } return $list; } /** * 获取底部导航配置 * @param $key * @return array */ public function getBottomConfig($key) { return ( new CoreDiyConfigService() )->getBottomConfig($key); } /** * 底部导航配置 * @param $data * @param $key * @return SysConfig|bool|Model */ public function setBottomConfig($data, $key) { return ( new CoreDiyConfigService() )->setBottomConfig($data, $key); } /** * 设置启动页 * @param $data * @return SysConfig|bool|Model */ public function setStartUpPageConfig($data) { return ( new CoreDiyConfigService() )->setStartUpPageConfig($data); } /** * 获取启动页配置 * @param $name * @return array */ public function getStartUpPageConfig($name) { return ( new CoreDiyConfigService() )->getStartUpPageConfig($name); } }