@php $routeName = (string) (request()->route()?->getName() ?? ''); $parts = explode('.', $routeName); $moduleKey = $parts[1] ?? 'dashboard'; $actionKey = $parts[2] ?? 'index'; $moduleMeta = [ 'dashboard' => ['label' => '控制台', 'index' => 'admin.dashboard', 'subtitle' => '查看系统概览与关键运营数据。'], 'tools' => ['label' => 'AI 工具', 'index' => 'admin.tools.index', 'subtitle' => '维护工具信息、状态与展示内容。'], 'models' => ['label' => 'AI 模型', 'index' => 'admin.models.index', 'subtitle' => '管理模型参数、评分与发布状态。'], 'articles' => ['label' => 'AI 资讯', 'index' => 'admin.articles.index', 'subtitle' => '维护资讯内容、来源与发布质量。'], 'guides' => ['label' => 'AI 教程', 'index' => 'admin.guides.index', 'subtitle' => '维护教程内容与学习难度层级。'], 'categories' => ['label' => '分类管理', 'index' => 'admin.categories.index', 'subtitle' => '统一管理分类体系与启用状态。'], 'sources' => ['label' => '来源管理', 'index' => 'admin.sources.index', 'subtitle' => '维护可用来源及可信度配置。'], 'settings' => ['label' => '首页配置', 'index' => 'admin.settings.index', 'subtitle' => '配置首页模块、条目和展示顺序。'], 'feedback' => ['label' => '反馈管理', 'index' => 'admin.feedback.index', 'subtitle' => '跟进用户反馈并更新处理状态。'], 'crawlers' => ['label' => '采集规则', 'index' => 'admin.crawlers.index', 'subtitle' => '维护采集目标、字段映射与调度策略。'], 'crawl-runs' => ['label' => '采集运行', 'index' => 'admin.crawl-runs.index', 'subtitle' => '查看每次采集执行结果、失败原因和重试。'], 'crawl-alerts' => ['label' => '采集告警', 'index' => 'admin.crawl-alerts.index', 'subtitle' => '集中处理采集异常并追踪恢复情况。'], ][$moduleKey] ?? ['label' => '管理后台', 'index' => 'admin.dashboard', 'subtitle' => '维护站点内容与配置。']; $actionLabel = [ 'index' => '列表', 'create' => '新建', 'edit' => '编辑', 'show' => '详情', ][$actionKey] ?? '详情'; $defaultTitle = $moduleMeta['label']; $pageTitle = trim((string) $__env->yieldContent('title')); $pageTitle = $pageTitle !== '' ? $pageTitle : $defaultTitle; $pageSubtitle = trim((string) $__env->yieldContent('page_subtitle')); if ($pageSubtitle === '') { $pageSubtitle = $actionKey === 'index' ? $moduleMeta['subtitle'] : '当前为'.$actionLabel.'页面,请按提示完善信息后保存。'; } @endphp

{{ $pageTitle }}

{{ $pageSubtitle }}
@if(trim((string) $__env->yieldContent('page_actions')) !== '')
@yield('page_actions')
@endif