{extend name="base" /} {block name="get-data"} {video:seocopy scene="home" export_name="seoCopy" /} {php} $strHomeIntroTitle = trim((string)($DomainModel->d_name ?? '')); if ($strHomeIntroTitle === '') { $strHomeIntroTitle = '影视内容推荐'; } $strHomeIntroText = trim((string)($seoCopy['intro_text'] ?? $seoCopy['category_intro'] ?? '')); if ($strHomeIntroText === '') { $strHomeIntroText = trim((string)($seoCopy['description'] ?? '')); } if ($strHomeIntroText === '') { $strHomeIntroText = $strHomeIntroTitle . '首页整理了电影、剧集、综艺、动漫等常见入口,适合先看首屏推荐,再继续按分类、榜单和搜索缩小范围。'; } $strHomeIntroMeta = trim((string)($seoCopy['intro_meta'] ?? $seoCopy['faq_content'] ?? '')); if ($strHomeIntroMeta === '') { $strHomeIntroMeta = '建议先看首屏推荐,再根据题材、热度和搜索词继续深入浏览。'; } $arrHomeCategoryNames = array_values(array_filter(array_map(static function ($arrCategory): string { return trim((string)($arrCategory['name'] ?? '')); }, (array)($TpStyle['template_cfg']['pages']['home']['categories'] ?? [])), static function (string $strName): bool { return $strName !== ''; })); $strHomeCategorySummary = implode('、', array_slice($arrHomeCategoryNames, 0, 3)); if ($strHomeCategorySummary === '') { $strHomeCategorySummary = '电影、剧集、综艺'; } $arrHomeSlotKeys = array_values(array_filter(array_map(static function ($arrSlot): string { return trim((string)($arrSlot['layout_key'] ?? '')); }, (array)($TpStyle['template_cfg']['pages']['home']['slots'] ?? [])), static function (string $strKey): bool { return $strKey !== ''; })); $strHomePrimarySlot = $arrHomeSlotKeys[0] ?? 'news'; $arrHomePrimarySlotLabelMap = [ 'news' => '更新区', 'rank' => '榜单区', 'tuijian' => '推荐区', 'update' => '更新区', 'piaofang' => '热度区', 'lunli' => '内容区', ]; $strHomePrimarySlotLabel = $arrHomePrimarySlotLabelMap[$strHomePrimarySlot] ?? '推荐区'; $intHomeTopSlotCount = count((array)($TpStyle['template_cfg']['pages']['home']['slots'] ?? [])); $intHomeCategoryCount = count((array)($TpStyle['template_cfg']['pages']['home']['categories'] ?? [])); $arrHomeQuickSignals = [ ['label' => '首屏主区', 'text' => '先看' . $strHomePrimarySlotLabel], ['label' => '频道方向', 'text' => $strHomeCategorySummary], ['label' => '内容覆盖', 'text' => '当前约有' . (1 + $intHomeTopSlotCount + $intHomeCategoryCount) . '组入口区块'], ['label' => '浏览节奏', 'text' => '首屏吸引 -> 详情判断 -> 播放选择'], ]; $arrHomeGuideCards = array_values(array_filter((array)($seoCopy['guide_cards'] ?? []), static function ($arrCard): bool { return is_array($arrCard) && ( trim((string)($arrCard['title'] ?? '')) !== '' || trim((string)($arrCard['text'] ?? '')) !== '' ); })); if (empty($arrHomeGuideCards)) { $arrHomeGuideCards = [ [ 'title' => '首屏入口', 'text' => '首页第一屏更适合先看' . $strHomePrimarySlotLabel . '和刚刚更新,快速判断当前最值得点开的内容。', ], [ 'title' => '内容范围', 'text' => '当前首页已经把' . $strHomeCategorySummary . '等入口串起来,适合横向切换不同内容类型。', ], [ 'title' => '搜索建议', 'text' => '如果你已经知道片名、演员或题材词,直接用搜索通常会比翻列表更快。', ], [ 'title' => '后续路径', 'text' => '找到感兴趣的内容后,建议先看详情页确认题材和线路,再决定是否直接进入播放页。', ], ]; } {/php} {/block} {block name="title"}{site:seotkd code="title" page="home" /}{/block} {block name="keywords"}{site:seotkd code="keywords" page="home" /}{/block} {block name="description"}{site:seotkd code="description" page="home" /}{/block} {block name="head"} {// 社交媒体标签 } {// 结构化数据 } {/block} {block name="main"}
首页导览

{$strHomeIntroTitle}

{$strHomeIntroText}

{$strHomeIntroMeta}

{foreach $arrHomeQuickSignals as $arrSignal}
{$arrSignal.label} {$arrSignal.text}
{/foreach}
{// lunli } {assign name="Slot" value="$TpStyle.template_cfg.pages.home.lunliSlots[0]"} {assign name="title" value="$Slot.title_text"} {include file="module/list/title/_title_router" /} {assign name="listCfg" value="$TpStyle.template_cfg.list_layout.lunli"} {assign name="limit" value="$listCfg.layout['max_items']"} {video:listexp count="$limit" v_category_en="lun-li-pian" d_key="key" d_val="Video" cache_life="3600" export_name="__LIST__" /} {include file="module/list/shell/_shell_router" /} {// top} {foreach $TpStyle.template_cfg.pages.home.slots as $Slot} {assign name="module" value="$Slot['layout_key']"} {assign name="limit" value="$TpStyle.template_cfg.list_layout[$module]['layout']['max_items']"} {if $module == 'rank'} {video:ranklistexp count="$limit" sort_type="weekly" d_key="key" d_val="Video" cache_life="3600" export_name="__LIST__" /} {else/} {video:listexp count="$limit" sort_type="$module" d_key="key" d_val="Video" cache_life="3600" export_name="__LIST__" /} {/if} {include file="module/list/home_block" /} {/foreach} {include file="module/seo_copy/collection" /} {// 分类} {foreach $TpStyle.template_cfg.pages.home.categories as $HomeCategory} {assign name="Slot" value="$HomeCategory"} {site:vciurl parent_category="$HomeCategory.key" export_name="strMoreUrl" /} {assign name="title" value="$Slot.title_text"} {include file="module/list/title/_title_router" /} {assign name="HomeCategoryModel" value="$HomeCategory.layout_key"} {assign name="listCfg" value="$TpStyle.template_cfg.list_layout[$HomeCategoryModel]"} {assign name="limit" value="$listCfg.layout['max_items']"} {video:listexp count="$limit" v_parent_category_en="$HomeCategory.key" sort_type="news" d_key="d_key" d_val="Video" cache_life="3600" export_name="__LIST__" /} {// ===== Shell + Item ===== } {include file="module/list/shell/_shell_router" /} {/foreach}
{/block}