218 lines
8.0 KiB
HTML
218 lines
8.0 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" export_name="arrVideo"/}
|
||
{elseif $Request.route.intVId}
|
||
{video:info v_id="$Request.route.intVId" v_key="arrVideo" export_name="arrVideo"/}
|
||
{else}
|
||
{video:info v_id="$DomainModel->info_id" n_key="arrVideo" export_name="arrVideo" /}
|
||
{/if}
|
||
|
||
{site:vciurl parent_category="$arrVideo.v_parent_category_en" export_name="strVciurl" /}
|
||
{site:vclurl parent_category="$arrVideo.v_parent_category_en"
|
||
category="$arrVideo.v_category_en"
|
||
area="all" lang="all" year="all" order="all" page="1"
|
||
export_name="strVclurl" /}
|
||
|
||
{php}
|
||
$arrBreadcrumb = [
|
||
['title'=>'首页','url'=>'/'],
|
||
['title'=>$arrVideo['v_parent_category'],'url'=>$strVciurl],
|
||
['title'=>$arrVideo['v_category'],'url'=>$strVclurl],
|
||
];
|
||
{/php}
|
||
{/block}
|
||
|
||
|
||
{block name="title"}{site:seotkd code="title" page="play" /}{/block}
|
||
{block name="keywords"}{site:seotkd code="keywords" page="play" /}{/block}
|
||
{block name="description"}{site:seotkd code="description" page="play" /}{/block}
|
||
|
||
{block name="head"}
|
||
<meta name="robots" content="noindex,follow">
|
||
|
||
{if $Request.route.intVId }
|
||
<link rel="canonical" href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en" /}'>
|
||
{/if}
|
||
|
||
|
||
{// Open Graph 协议(用于Facebook、LinkedIn等)}
|
||
<meta property="og:title" content='{site:seotkd code="title" page="play" /}'>
|
||
<meta property="og:description" content='{site:seotkd code="description" page="play" /}'>
|
||
{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="https://{$DomainModel->d_domain}{$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="summary_large_image">
|
||
<meta name="twitter:title" content="{$arrVideo.v_name|raw} - {$arrVideo.v_category|default=''|raw}完整版在线观看 - {$DomainModel->d_name|raw}">
|
||
<meta name="twitter:description" content="{if !empty($arrVideo.v_description)}{$arrVideo.v_description|raw}{else/}{$DomainModel->d_name|raw}为你提供{$arrVideo.v_name|raw}在线播放与相关内容推荐。{/if}">
|
||
<meta name="twitter:image" content="{if stripos($arrVideo.v_pic,'http')===0}{$arrVideo.v_pic|raw}{else/}https://{$DomainModel->d_domain}{$arrVideo.v_pic|raw}{/if}">
|
||
|
||
{php}
|
||
// 你已有:$arrBreadcrumb(title/url)
|
||
// 这里补成绝对 URL,避免 JSON-LD 用相对路径
|
||
$strBase = 'https://' . $DomainModel->d_domain;
|
||
|
||
$arrBreadcrumbLd = [];
|
||
foreach ($arrBreadcrumb as $intIdx => $arrIt) {
|
||
$strTitle = (string)($arrIt['title'] ?? '');
|
||
$strUrl = (string)($arrIt['url'] ?? '');
|
||
|
||
if ($strTitle === '' || $strUrl === '') {
|
||
continue;
|
||
}
|
||
|
||
// url 绝对化
|
||
if (stripos($strUrl, 'http') !== 0) {
|
||
if ($strUrl[0] !== '/') {
|
||
$strUrl = '/' . $strUrl;
|
||
}
|
||
$strUrl = $strBase . $strUrl;
|
||
}
|
||
|
||
$arrBreadcrumbLd[] = [
|
||
'@type' => 'ListItem',
|
||
'position' => (int)($intIdx + 1),
|
||
'name' => $strTitle,
|
||
'item' => $strUrl,
|
||
];
|
||
}
|
||
{/php}
|
||
|
||
<script type="application/ld+json">
|
||
{
|
||
"@context": "https://schema.org",
|
||
"@type": "BreadcrumbList",
|
||
"itemListElement": {php}echo json_encode($arrBreadcrumbLd, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);{/php}
|
||
}
|
||
</script>
|
||
|
||
|
||
<script type="application/ld+json">
|
||
{
|
||
"@context": "https://schema.org",
|
||
"@type": "VideoObject",
|
||
"name": "{$arrVideo.v_name|raw}",
|
||
"description": "{if !empty($arrVideo.v_description)}{$arrVideo.v_description|raw}{else/}暂无简介{/if}",
|
||
"thumbnailUrl": "{$arrVideo.v_pic|raw}",
|
||
"uploadDate": "{:date('Y-m-d')}",
|
||
"url": "https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en"/}"
|
||
{if !empty($arrVideo.v_lang)},{/if}
|
||
{if !empty($arrVideo.v_lang)}
|
||
"inLanguage": [
|
||
{volist name="$arrVideo.v_lang" id="strVideoLang" key="index"}{if $index>1},{/if}"{$strVideoLang|raw}"{/volist}
|
||
]
|
||
{/if}
|
||
{if !empty($arrVideo.v_area)},{/if}
|
||
{if !empty($arrVideo.v_area)}
|
||
"contentLocation": [
|
||
{volist name="$arrVideo.v_area" id="strVideoArea" key="index"}{if $index>1},{/if}{
|
||
"@type": "Place",
|
||
"name": "{$strVideoArea|raw}"
|
||
}{/volist}
|
||
]
|
||
{/if}
|
||
{if !empty($arrVideo.v_director)},{/if}
|
||
{if !empty($arrVideo.v_director)}
|
||
"director": [
|
||
{volist name="$arrVideo.v_director" id="strVideoDirector" key="index"}{if $index>1},{/if}{
|
||
"@type": "Person",
|
||
"name": "{$strVideoDirector|raw}"
|
||
}{/volist}
|
||
]
|
||
{/if}
|
||
{if !empty($arrVideo.v_actor)},{/if}
|
||
{if !empty($arrVideo.v_actor)}
|
||
"actor": [
|
||
{volist name="$arrVideo.v_actor" id="strVideoActor" key="index"}{if $index>1},{/if}{
|
||
"@type": "Person",
|
||
"name": "{$strVideoActor|raw}"
|
||
}{/volist}
|
||
]
|
||
{/if}
|
||
{if !empty($arrVideo.v_score) && floatval($arrVideo.v_score)>0},{/if}
|
||
{if !empty($arrVideo.v_score) && floatval($arrVideo.v_score)>0}
|
||
"aggregateRating": {
|
||
"@type": "AggregateRating",
|
||
"ratingValue": "{$arrVideo.v_score|raw}",
|
||
"ratingCount": 1
|
||
}
|
||
{/if},
|
||
"publisher": {
|
||
"@type": "Organization",
|
||
"name": "{$DomainModel->d_name|raw}"
|
||
}
|
||
}
|
||
</script>
|
||
|
||
{/block}
|
||
|
||
{block name="strPageCode"}<?php $strPageCode = 'player'; ?>{/block}
|
||
|
||
{block name="head-css"}
|
||
{// <link rel="stylesheet" href="/public/video/DPlayer.min.css"> /}
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.css">
|
||
{/block}
|
||
|
||
{block name="main"}
|
||
{assign name="pageCfg" value="$TpStyle.template_cfg.pages.play"}
|
||
|
||
{include file="module/page/page_router" /}
|
||
|
||
<script>
|
||
const strMaxPlayHeight = '480px'
|
||
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']}`,
|
||
|
||
};
|
||
var intPlayUrlIndex = '{$Request.route.intPlayIndex}'
|
||
var strPlayType = '{$Request.route.strPlayType}'
|
||
var intJumpTimeFirst = 1;
|
||
var intJumpTimeTwoStart = 1;
|
||
var intJumpTimeTwoEnd = 1;
|
||
var arrPlayUrl = {$arrVideo.v_play_url|json_encode|raw} ;
|
||
var strPlayUrl = ""
|
||
var boolIsPlayPage = true
|
||
</script>
|
||
|
||
{/block}
|
||
{block name="footer-js"}
|
||
{// <script src="https://cdn.staticfile.org/jquery/3.7.1/jquery.min.js"></script>/}
|
||
{// <script type="text/javascript" src="/public/video/hls.min.js" ></script>/}
|
||
{// <script type="text/javascript" src="/public/video/DPlayer.min.js" ></script>/}
|
||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/hls.js/dist/hls.min.js"></script>
|
||
|
||
{/block}
|