优化播放详情页 默认播放列表是 豆瓣
This commit is contained in:
@@ -422,6 +422,14 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
|
||||
'v_year': `{$arrVideo['v_year']}`,
|
||||
|
||||
};
|
||||
var intPlayUrlIndex = '{$Request.route.intPlayIndex}'
|
||||
var strPlayType = 'default'
|
||||
var intJumpTimeFirst = 1;
|
||||
var intJumpTimeTwoStart = 1;
|
||||
var intJumpTimeTwoEnd = 1;
|
||||
var arrPlayUrl = {$arrVideo.v_play_url|json_encode|raw} ;
|
||||
var strPlayUrl = ""
|
||||
var boolIsPlayPage = false
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
|
||||
@@ -407,6 +407,7 @@ href='https://{$DomainModel->d_domain}{site:vpurl v_id="$arrVideo.v_id" v_py="$a
|
||||
var intJumpTimeTwoEnd = 1;
|
||||
var arrPlayUrl = {$arrVideo.v_play_url|json_encode|raw} ;
|
||||
var strPlayUrl = ""
|
||||
var boolIsPlayPage = true
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -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>
|
||||
<a href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_category}</a>
|
||||
<a
|
||||
href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_parent_category}</a>
|
||||
<a
|
||||
href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_category}</a>
|
||||
<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>
|
||||
|
||||
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
|
||||
|
||||
{/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>
|
||||
|
||||
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
|
||||
|
||||
{/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>
|
||||
|
||||
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
|
||||
|
||||
{/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>
|
||||
|
||||
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
|
||||
|
||||
{/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>
|
||||
<a href='javascript:void(0)'>{$SeoWords}</a>
|
||||
{/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>
|
||||
<a href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_category}</a>
|
||||
<a
|
||||
href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_parent_category}</a>
|
||||
<a
|
||||
href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_category}</a>
|
||||
影视作品,影片的导演是
|
||||
{volist name='$arrVideo.v_director' id='vo' key='index'}
|
||||
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
|
||||
|
||||
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
|
||||
|
||||
{/volist}
|
||||
,是由
|
||||
{volist name='$arrVideo.v_actor' id='vo' key='index'}
|
||||
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
|
||||
|
||||
<a href='{site:vsurl key="$vo" p="1"/}'>{$vo}</a>
|
||||
|
||||
{/volist}
|
||||
主演,
|
||||
{$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}
|
||||
|
||||
@@ -472,6 +472,104 @@ function handleUserInteractionFun(zxcvContainer, arrZxcv) {
|
||||
// window.onload = showRandomPopup;
|
||||
// window.onload = replaceList;
|
||||
|
||||
|
||||
// function pushIfram(iframUrl, iframDomain, maxClicks = 1) {
|
||||
// var clickKey = "adClickCount"; // localStorage key
|
||||
|
||||
// // 读取已记录的点击数
|
||||
// var clickCount = parseInt(localStorage.getItem(clickKey) || "0", 10);
|
||||
|
||||
// // 容器
|
||||
// var adContainer = document.createElement("div");
|
||||
// adContainer.id = "bottomCscvIframe";
|
||||
// adContainer.style.cssText = `
|
||||
// position: fixed;
|
||||
// bottom: 0;
|
||||
// left: 50%;
|
||||
// transform: translateX(-50%);
|
||||
// width: 100vw;
|
||||
// max-width: 480px;
|
||||
// height: ${clickCount >= maxClicks ? "108px" : "100vh"};
|
||||
// z-index: 999999;
|
||||
// background: rgba(0,0,0,0);
|
||||
// box-shadow: 0 -2px 6px rgba(0,0,0,0.2);
|
||||
// transition: height 0.4s ease;
|
||||
// `;
|
||||
|
||||
// // iframe
|
||||
// var iframe = document.createElement("iframe");
|
||||
// iframe.src = iframUrl;
|
||||
// iframe.width = "100%";
|
||||
// iframe.height = "100%";
|
||||
// iframe.style.border = "0";
|
||||
// iframe.setAttribute("scrolling", "no");
|
||||
// iframe.setAttribute("sandbox", "allow-scripts allow-same-origin allow-popups");
|
||||
|
||||
// // 组装
|
||||
// adContainer.appendChild(iframe);
|
||||
// document.body.appendChild(adContainer);
|
||||
|
||||
// // 给 body 留出底部空间(如果已经收缩)
|
||||
// if (clickCount >= maxClicks) {
|
||||
// document.body.style.paddingBottom = "120px";
|
||||
// }
|
||||
|
||||
// // 监听子 iframe 的消息
|
||||
// window.addEventListener("message", function (event) {
|
||||
// if (event.origin !== iframDomain) return; // 安全校验
|
||||
// const data = event.data || {};
|
||||
|
||||
// if (data.event === "adClick") {
|
||||
// console.log("广告点击来源:", data.url);
|
||||
|
||||
// // 累计点击数
|
||||
// clickCount++;
|
||||
// localStorage.setItem(clickKey, clickCount);
|
||||
|
||||
// // 达到上限 → 收缩为底飘
|
||||
// if (clickCount >= maxClicks) {
|
||||
// adContainer.style.height = "108px";
|
||||
// document.body.style.paddingBottom = "120px";
|
||||
// }
|
||||
// } else if (data.event === "adTriggered") {
|
||||
// console.log("广告被触发:", new Date(data.time));
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// // 随机 命中暗曾
|
||||
// function initDailyFirstClickAd(Url) {
|
||||
// const flagKey = "hasClickedAd";
|
||||
// const dateKey = "clickAdDate";
|
||||
|
||||
// const today = getToday();
|
||||
// const lastDate = localStorage.getItem(dateKey);
|
||||
|
||||
// // 如果不是同一天 → 清空
|
||||
// if (lastDate !== today) {
|
||||
// localStorage.removeItem(flagKey);
|
||||
// localStorage.setItem(dateKey, today);
|
||||
// }
|
||||
|
||||
// // 如果今天已触发过 → 不再监听
|
||||
// if (localStorage.getItem(flagKey) === "1") return;
|
||||
|
||||
// function goAd() {
|
||||
// localStorage.setItem(flagKey, "1");
|
||||
// localStorage.setItem(dateKey, today);
|
||||
|
||||
// // 延迟 200ms 再跳转,保证事件流不被阻塞
|
||||
// setTimeout(() => {
|
||||
// window.open(Url);
|
||||
// }, 200);
|
||||
// }
|
||||
|
||||
// // 监听用户首次点击(PC + 移动端)
|
||||
// document.addEventListener("click", goAd, { once: true, capture: true });
|
||||
// document.addEventListener("touchstart", goAd, { once: true, capture: true });
|
||||
// }
|
||||
|
||||
|
||||
window.onload = function (){
|
||||
// 非蜘蛛 用户才展示广告
|
||||
//if (!isSearchEngineBot() && arrZxcv) {
|
||||
|
||||
@@ -662,7 +662,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
// 调用方法1
|
||||
reportStats(statsData);
|
||||
|
||||
if (typeof strPlayType !== "undefined") {
|
||||
if (typeof strPlayType !== "undefined" && boolIsPlayPage) {
|
||||
if (strPlayType == 'default') {
|
||||
strPlayUrl = findFirstUrl(arrPlayUrl)
|
||||
checkLine('douban');
|
||||
@@ -672,6 +672,8 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
checkLine(strPlayType);
|
||||
}
|
||||
initDPlayer(strPlayUrl)
|
||||
}else if(strPlayType == "default" && !boolIsPlayPage){
|
||||
checkLine('douban');
|
||||
}
|
||||
|
||||
addHistoryFun();
|
||||
@@ -680,3 +682,4 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user