Files
SEONexus/code/app/home/view/videoGpt1/module/detail/detail_01.html

109 lines
3.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<article class="{$TpStyle.dom_prefix}-d1-wrap">
{php}
$strDetailPlaySlug = trim((string)($arrVideo['v_name_en'] ?? ''));
if ($strDetailPlaySlug === '') {
$strDetailPlaySlug = (string)($arrVideo['v_id'] ?? '');
}
{/php}
{// 顶部基本信息 }
<header class="{$TpStyle.dom_prefix}-d1-hd">
<img loading="lazy"
src="{site:cfg code='PUBLIC_COVER_DOMAIN' encode='false'/}{$arrVideo.v_pic}"
alt="{$arrVideo.v_name}"
class="{$TpStyle.dom_prefix}-d1-cover">
<div class="{$TpStyle.dom_prefix}-d1-info">
<h1>{$arrVideo.v_name}</h1>
<p><b>类型:</b>{$arrVideo.type.type_name}</p>
<p><b>主演:</b>{$arrVideo.v_actor}</p>
<p><b>地区:</b>{$arrVideo.v_area}</p>
<p><b>年份:</b>{$arrVideo.v_year}</p>
</div>
</header>
{// 播放线路 TAB }
<nav class="{$TpStyle.dom_prefix}-d1-tabs">
<?php $keyLineGroup = 0; ?>
{foreach $arrVideo.v_play_url as $strPlayGroupName=>$arrPlayUrlType }
<?php $keyLineGroup++ ;?>
<a class="{$TpStyle.dom_prefix}-d1-tab {eq name='$keyLineGroup' value='1'}active{/eq}"
onclick="d1SwitchTab('{$strPlayGroupName}')">
{$strPlayGroupName}
</a>
{/foreach}
</nav>
{// 各线路播放集数列表 }
<div class="{$TpStyle.dom_prefix}-d1-playlists">
<?php $keyLineGroup = 0; ?>
{foreach $arrVideo.v_play_url as $strPlayGroupName=>$arrPlayUrlType }
<?php $keyLineGroup++ ;?>
<ul class="{$TpStyle.dom_prefix}-d1-list {eq name='$keyLineGroup' value='1'}active{/eq}"
id="play_{$strPlayGroupName}">
<?php $keyLine = 0; ?>
{volist name='$arrPlayUrlType' id='arrPlayUrl'}
<?php $keyLine++ ;?>
{php}
$strEpisodePlayUrl = app(\app\services\VideoService::class)->getVideoPlayUrl(
(int)($arrVideo['v_id'] ?? 0),
$strDetailPlaySlug,
(string)$strPlayGroupName,
(int)$keyLine
);
{/php}
<li>
<a class="{if $keyLine == $Request.route.intPlayIndex}active{/if}"
href="{$strEpisodePlayUrl}"
m3u8="{$arrPlayUrl.url}">
{$arrPlayUrl.name}
</a>
</li>
{/volist}
</ul>
{/foreach}
</div>
{// 剧情简介 }
<section class="{$TpStyle.dom_prefix}-d1-desc">
<h2>剧情简介</h2>
<p>{$arrVideo.v_des}</p>
</section>
{// 相关推荐站内沉淀、SEO 拉链) }
<section class="{$TpStyle.dom_prefix}-d1-rel">
<h3>相关推荐</h3>
<div class="{$TpStyle.dom_prefix}-d1-relgrid">
{video:listexp count="8" v_category="$arrVideo.v_category" d_key="key" d_val="Video"
export_name="arrRelated" cache_life="3600" /}
{volist name="arrRelated" id="re"}
<a href="/detail/{$re.v_id}.html" class="{$TpStyle.dom_prefix}-d1-relcard">
<img loading="lazy"
src="{site:cfg code='PUBLIC_COVER_DOMAIN' encode='false'/}{$re.v_pic}"
alt="{$re.v_name}">
<p>{$re.v_name}</p>
</a>
{/volist}
</div>
</section>
</article>
<script>
function d1SwitchTab(name) {
document.querySelectorAll('.{$TpStyle.dom_prefix}-d1-list').forEach(e => e.classList.remove('active'));
document.querySelector('#play_'+name).classList.add('active');
document.querySelectorAll('.{$TpStyle.dom_prefix}-d1-tab').forEach(e => e.classList.remove('active'));
event.target.classList.add('active');
}
</script>