219 lines
6.7 KiB
HTML
219 lines
6.7 KiB
HTML
{extend name="base" /}
|
||
|
||
{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" /}
|
||
{elseif $Request.route.intVId}
|
||
{video:info v_id="$Request.route.intVId" v_key="arrVideo" /}
|
||
{else}
|
||
{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" /}
|
||
|
||
{/block}
|
||
|
||
{block name="title"}
|
||
{if $DomainModel->info_id == $Request.route.intVId || empty($Request.route.intVId)}
|
||
{site:replace code="VIDEO@INDEX@INDEX@TITLE"}
|
||
{else}
|
||
{site:replace code="VIDEO@GETVIDEOINFO@TITLE" diff="$Request.route.intVId" /}
|
||
{/if}
|
||
{/block}
|
||
|
||
|
||
{block name="keywords"}
|
||
{if $DomainModel->info_id == $Request.route.intVId || empty($Request.route.intVId)}
|
||
{site:replace code="VIDEO@INDEX@INDEX@KEYWORDS"}
|
||
{else}
|
||
{site:replace code="VIDEO@GETVIDEOINFO@KEYWORDS" diff="$Request.route.intVId"}
|
||
{/if}
|
||
{/block}
|
||
|
||
{block name="description"}
|
||
{if $DomainModel->info_id == $Request.route.intVId || empty($Request.route.intVId)}
|
||
{site:replace code="VIDEO@INDEX@INDEX@DESCRIPTION"}
|
||
{else}
|
||
{site:replace code="VIDEO@GETVIDEOINFO@DESCRIPTION" diff="$Request.route.intVId"}
|
||
{/if}
|
||
{/block}
|
||
|
||
|
||
{block name="head"}
|
||
|
||
{// Open Graph 协议(用于Facebook、LinkedIn等)}
|
||
<meta property="og:title" content='{site:replace code="VIDEO@GETVIDEOINFO@TITLE"}'>
|
||
<meta property="og:description" content='{site:replace code="VIDEO@GETVIDEOINFO@DESCRIPTION"}'>
|
||
{switch $arrVideo.v_parent_category_en }
|
||
{case 'dian-ying' }
|
||
<meta property="og:type" content="video.movie" />
|
||
{/case}
|
||
{case 'dian-shi-ju' }
|
||
<meta property="og:type" content="video.episode" />
|
||
{/case}
|
||
{case 'zong-yi' }
|
||
<meta property="og:type" content="video.tv_show" />
|
||
{/case}
|
||
{case 'dong-man' }
|
||
<meta property="og:type" content="video.episode" />
|
||
{/case}
|
||
{case 'duan-ju-da-quan' }
|
||
<meta property="og:type" content="video.episode" />
|
||
{/case}
|
||
{default /}
|
||
<meta property="og:type" content="video.movie" />
|
||
{/switch}
|
||
<meta property="og:url"
|
||
content='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en"/}'>
|
||
<meta property="og:image" content="{$arrVideo.v_pic}">
|
||
<meta property="og:site_name" content="{$DomainModel->d_name}">
|
||
<meta property="og:video:type" content="video/m3u8">
|
||
|
||
{// Twitter Card(用于Twitter/X)}
|
||
<meta name="twitter:card" content="player">
|
||
<meta name="twitter:title" content='{site:replace code="VIDEO@GETVIDEOINFO@TITLE"}'>
|
||
<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}
|
||
<link rel="canonical"
|
||
href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en"/}'>
|
||
{/if}
|
||
|
||
{// 结构化数据}
|
||
<script type="application/ld+json">
|
||
{
|
||
"@context": "https://schema.org",
|
||
"@type": "VideoObject",
|
||
"name": "{$arrVideo.v_name}",
|
||
"description": "{$arrVideo.v_description}",
|
||
"thumbnailUrl": "{$arrVideo.v_pic}",
|
||
"uploadDate": "{:date('Y-m-d')}",
|
||
"url": 'https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en"/}',
|
||
"genre": ["动作", "科幻"],
|
||
"keywords": '{site:replace code="VIDEO@GETVIDEOINFO@KEYWORDS"}',
|
||
"inLanguage": [
|
||
{volist name='$arrVideo.v_lang' id='strVideoLang' key='index'}
|
||
"{$strVideoLang}",
|
||
{/volist}
|
||
],
|
||
"contentLocation": [
|
||
{volist name='$arrVideo.v_area' id='strVideoArea' key='index'}
|
||
{
|
||
"@type": "Place",
|
||
"name": "{$strVideoArea}"
|
||
},
|
||
{/volist}
|
||
],
|
||
|
||
"director": [
|
||
{volist name='$arrVideo.v_director' id='strVideoDirector' key='index'}
|
||
{
|
||
"@type": "Person",
|
||
"name": "{$strVideoDirector}"
|
||
}
|
||
{/volist}
|
||
],
|
||
"actor": [
|
||
{volist name='$arrVideo.v_actor' id='strVideoActor' key='index'}
|
||
{
|
||
"@type": "Person",
|
||
"name": "{$strVideoActor}"
|
||
},
|
||
{/volist}
|
||
],
|
||
"aggregateRating": {
|
||
"@type": "AggregateRating",
|
||
"ratingValue": "{$arrVideo.v_score}",
|
||
},
|
||
"publisher": {
|
||
"@type": "Organization",
|
||
"name": "{$DomainModel->d_name}",
|
||
}
|
||
|
||
}
|
||
|
||
</script>
|
||
{/block}
|
||
|
||
{block name='body-class'}video-info-page{/block}
|
||
|
||
{block name="strPageCode"}
|
||
<?php $strPageCode = 'info'; ?>
|
||
{/block}
|
||
|
||
{block name="main"}
|
||
|
||
<section class="detail">
|
||
|
||
<div class="detail-head">
|
||
<div class="detail-cover">
|
||
<img src="{$info.pic}">
|
||
</div>
|
||
|
||
<div class="detail-info">
|
||
<h1>{$info.title}</h1>
|
||
<div class="detail-sub">{$info.year} · {$info.area} · {$info.type}</div>
|
||
|
||
<!-- 伪原创简介 -->
|
||
<p class="detail-intro">
|
||
{php}$desc = \app\common\helper\TextSpin::spin($info['intro'], $style['theme_id']);{/php}
|
||
{$desc}
|
||
</p>
|
||
|
||
<a class="btn" href="/play/{$info.id}-1-1.html">开始播放</a>
|
||
</div>
|
||
</div>
|
||
|
||
<h3 class="sec-title">剧集列表</h3>
|
||
<div class="episode-list">
|
||
{volist name="episodes" id="vo"}
|
||
<a href="/play/{$info.id}-{$vo.n}-1.html">第{$vo.n}集</a>
|
||
{/volist}
|
||
</div>
|
||
|
||
</section>
|
||
|
||
|
||
|
||
<script>
|
||
|
||
const strVideoId = `{$arrVideo.v_id}`;
|
||
const arrVideo = {
|
||
'v_id': `{$arrVideo['v_id']}`,
|
||
'v_name_en': `{$arrVideo['v_name_en']}`,
|
||
'v_pic': `{$arrVideo['v_pic']}`,
|
||
'v_name': `{$arrVideo['v_name']}`,
|
||
'v_description': `{$arrVideo['v_description']}`,
|
||
'v_publish_date': `{$arrVideo['v_publish_date']}`,
|
||
'v_remarks': `{$arrVideo['v_remarks']}`,
|
||
'v_category': `{$arrVideo['v_category']}`,
|
||
'v_year': `{$arrVideo['v_year']}`,
|
||
|
||
};
|
||
var strPlayType = 'default'
|
||
var boolIsPlayPage = false
|
||
|
||
document.addEventListener('DOMContentLoaded', function () {
|
||
const trigger = document.querySelector('.check-desc-btn');
|
||
if (!trigger) return; // 页面没有按钮就不继续
|
||
|
||
trigger.addEventListener('click', function () {
|
||
const parent = trigger.closest('.lvshicms-vodlist__box') || trigger.parentElement;
|
||
const description = parent.querySelector('p.v-description-centent');
|
||
if (description) {
|
||
description.classList.toggle('txt-hidden');
|
||
const icon = trigger.querySelector('.iconfont');
|
||
if (icon) {
|
||
icon.classList.toggle('icon-down');
|
||
icon.classList.toggle('icon-up');
|
||
}
|
||
trigger.setAttribute('aria-expanded', !description.classList.contains('txt-hidden'));
|
||
}
|
||
});
|
||
});
|
||
|
||
</script>
|
||
|
||
{/block}
|
||
{block name="customize"} {/block} |