优化播放详情页 默认播放列表是 豆瓣

This commit is contained in:
make
2025-10-07 20:50:18 +08:00
parent c4c5c887b3
commit 2c6c43b649
5 changed files with 155 additions and 41 deletions

View File

@@ -2,12 +2,12 @@
{block name="get-data"}
{if $Request.route.intVId && $Request.route.intVForgeId}
{video:info v_id="$Request.route.intVId" v_key="arrVideo" v_fid="$Request.route.intVForgeId" /}
{if $Request.route.intVId && $Request.route.intVForgeId}
{video:info v_id="$Request.route.intVId" v_key="arrVideo" v_fid="$Request.route.intVForgeId" /}
{elseif $Request.route.intVId}
{video:info v_id="$Request.route.intVId" v_key="arrVideo" /}
{video:info v_id="$Request.route.intVId" v_key="arrVideo" /}
{else}
{video:info v_id="$DomainModel->info_id" n_key="arrVideo" /}
{video:info v_id="$DomainModel->info_id" n_key="arrVideo" /}
{/if}
{site:grm page_code="h5_video_info" diff="$arrVideo.v_id" num="120" g_key="arrGrm" /}
@@ -75,9 +75,9 @@
<meta name="twitter:description" content='{site:replace code="VIDEO@GETVIDEOINFO@DESCRIPTION"}'>
<meta name="twitter:image" content="{$arrVideo.v_pic}">
{if $Request.route.intVId && $Request.route.intVForgeId}
{if $Request.route.intVId && $Request.route.intVForgeId}
<link rel="canonical"
href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en"/}'>
href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en"/}'>
{/if}
{// 结构化数据}
@@ -139,7 +139,7 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
{block name='body-class'}video-info-page{/block}
{block name="strPageCode"}
<?php $strPageCode = 'info'; ?>
<?php $strPageCode = 'info'; ?>
{/block}
{block name="main"}
@@ -149,7 +149,7 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
<nav class="breadcrumb" aria-label="breadcrumb">
<ol itemscope itemtype="https://schema.org/BreadcrumbList">
<li style="margin-right:10px"><label><i class="baf725 fa fa-map-marker"></i></label></li>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a href="/" itemprop="item">
<span itemprop="name">首页</span>
@@ -170,8 +170,7 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
<meta itemprop="position" content="3" />
</li>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a href='{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en"/}'
itemprop="item">
<a href='{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en"/}' itemprop="item">
<span itemprop="name">{$arrVideo.v_name}</span>
</a>
<meta itemprop="position" content="4" />
@@ -195,8 +194,7 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
<a class="stui-vodlist__thumb picture v-thumb"
href='{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en"/}'
title="{$arrVideo.v_name}">
<img class="lazyload"
src="{$arrVideo.v_pic}">
<img class="lazyload" src="{$arrVideo.v_pic}">
<span class="play active hidden-xs"></span>
<span class="pic-text text-right">{$arrVideo.v_remarks}</span>
</a>
@@ -211,38 +209,40 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
</div>
<p class="data hidden-xs">
<span class="text-muted">类型:</span>
<a href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_parent_category}</a>&nbsp;
<a href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_category}</a>&nbsp;
<a
href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_parent_category}</a>&nbsp;
<a
href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_category}</a>&nbsp;
<span class="split-line"></span>
<span class="text-muted">地区:</span>
{volist name='$arrVideo.v_director' id='vo' key='index'}
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
&nbsp;
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
&nbsp;
{/volist}
<span class="split-line"></span>
<span class="text-muted">年份:{$arrVideo.v_year}</span>
<span class="split-line"></span>
<span class="text-muted">语言:</span>
{volist name='$arrVideo.v_lang' id='vo' key='index'}
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
&nbsp;
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
&nbsp;
{/volist}
</p>
<p class="data">
<span class="text-muted">主演:</span>
{volist name='$arrVideo.v_actor' id='vo' key='index'}
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
&nbsp;
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
&nbsp;
{/volist}
</p>
<p class="data">
<span class="text-muted">导演:</span>
{volist name='$arrVideo.v_director' id='vo' key='index'}
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
&nbsp;
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
&nbsp;
{/volist}
</p>
@@ -253,7 +253,7 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
<div class="play-btn clearfix">
<div class="share bdsharebuttonbox hidden-sm hidden-xs pull-right"></div>
<a class="btn btn-primary"
<a class="btn btn-primary"
href='{site:vpurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en" play_type="default" play_index="1" /}'>
立即播放
</a>
@@ -272,8 +272,8 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
<span class="nore text-muted pull-right"></span>
<?php $keyLineGroup = 0;?>
{foreach $arrVideo.v_play_url as $strPlayGroupName=>$arrPlayUrlType }
<?php $keyLineGroup ++ ;?>
<h3 class='title play-group-head {eq name="$keyLineGroup" value="1"}active {/eq}'
<?php $keyLineGroup ++ ;?>
<h3 class='title play-group-head {eq name="$keyLineGroup" value="1"}active {/eq}'
id="line_head_{$strPlayGroupName}" onclick="checkLine('{$strPlayGroupName}')">
<img src="/template/videodadi/icon/icon_30.png">
{$strPlayGroupName}
@@ -286,12 +286,14 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
<?php $keyLineGroup = 0;?>
{foreach $arrVideo.v_play_url as $strPlayGroupName=>$arrPlayUrlType }
<?php $keyLineGroup ++ ;?>
<ul class='stui-content__playlist clearfix play-group-list {eq name="$keyLineGroup" value="1"}active {/eq}' id="playlist_{$strPlayGroupName}">
<ul class='stui-content__playlist clearfix play-group-list {eq name="$keyLineGroup" value="1"}active {/eq}'
id="playlist_{$strPlayGroupName}">
<?php $keyLine = 0 ;?>
{volist name='$arrPlayUrlType' id='arrPlayUrl'}
<?php $keyLine ++ ;?>
<li class="{if $Request.route.intPlayIndex == $keyLine}active{/if}">
<a href='{site:vpurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en" play_type="$strPlayGroupName" play_index="$keyLine" /}'>{$arrPlayUrl.name}</a>
<a
href='{site:vpurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en" play_type="$strPlayGroupName" play_index="$keyLine" /}'>{$arrPlayUrl.name}</a>
</li>
{/volist}
</ul>
@@ -310,8 +312,7 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
</div>
<div class="stui-pannel_bd">
{volist name='$arrVideo.v_seo_words' key="index" id='SeoWords' }
<a
href='javascript:void(0)'>{$SeoWords}</a>&nbsp;&nbsp;
<a href='javascript:void(0)'>{$SeoWords}</a>&nbsp;&nbsp;
{/volist}
</div>
</div>
@@ -329,21 +330,23 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
<div class="detail col-pd">
<span class="detail-sketch">
{$arrVideo.v_name}是一部评分{$arrVideo.v_score}的
<a href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_parent_category}</a>&nbsp;
<a href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_category}</a>&nbsp;
<a
href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_parent_category}</a>&nbsp;
<a
href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_category}</a>&nbsp;
影视作品,影片的导演是
{volist name='$arrVideo.v_director' id='vo' key='index'}
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
&nbsp;
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
&nbsp;
{/volist}
,是由
{volist name='$arrVideo.v_actor' id='vo' key='index'}
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
&nbsp;
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
&nbsp;
{/volist}
&nbsp;主演,
{$arrVideo.v_description|raw}
</span>
</span>
</div>
</div>
</div>
@@ -376,7 +379,7 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
</div>
</div>
<div class="col-lg-wide-25 col-xs-1 stui-pannel-side visible-lg">
<div class="stui-pannel stui-pannel-bg clearfix">
<div class="stui-pannel-box">
<div class="stui-pannel_bd">
@@ -417,7 +420,8 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
};
document.addEventListener('DOMContentLoaded', function () {
const trigger = document.querySelector('.check-desc-btn');
const trigger = document.querySelector('.check-desc-btn');
if (!trigger) return; // 页面没有按钮就不继续
trigger.addEventListener('click', function () {
const parent = trigger.closest('.lvshicms-vodlist__box') || trigger.parentElement;
@@ -432,8 +436,8 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
trigger.setAttribute('aria-expanded', !description.classList.contains('txt-hidden'));
}
});
});
});
</script>
{/block}