优化播放详情页 默认播放列表是 豆瓣
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']}`,
|
'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>
|
</script>
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|||||||
@@ -407,6 +407,7 @@ href='https://{$DomainModel->d_domain}{site:vpurl v_id="$arrVideo.v_id" v_py="$a
|
|||||||
var intJumpTimeTwoEnd = 1;
|
var intJumpTimeTwoEnd = 1;
|
||||||
var arrPlayUrl = {$arrVideo.v_play_url|json_encode|raw} ;
|
var arrPlayUrl = {$arrVideo.v_play_url|json_encode|raw} ;
|
||||||
var strPlayUrl = ""
|
var strPlayUrl = ""
|
||||||
|
var boolIsPlayPage = true
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
{block name="get-data"}
|
{block name="get-data"}
|
||||||
|
|
||||||
{if $Request.route.intVId && $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" /}
|
{video:info v_id="$Request.route.intVId" v_key="arrVideo" v_fid="$Request.route.intVForgeId" /}
|
||||||
{elseif $Request.route.intVId}
|
{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}
|
{else}
|
||||||
{video:info v_id="$DomainModel->info_id" n_key="arrVideo" /}
|
{video:info v_id="$DomainModel->info_id" n_key="arrVideo" /}
|
||||||
{/if}
|
{/if}
|
||||||
{site:grm page_code="h5_video_info" diff="$arrVideo.v_id" num="120" g_key="arrGrm" /}
|
{site:grm page_code="h5_video_info" diff="$arrVideo.v_id" num="120" g_key="arrGrm" /}
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
{if $Request.route.intVId && $Request.route.intVForgeId}
|
{if $Request.route.intVId && $Request.route.intVForgeId}
|
||||||
<link rel="canonical"
|
<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}
|
{/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='body-class'}video-info-page{/block}
|
||||||
|
|
||||||
{block name="strPageCode"}
|
{block name="strPageCode"}
|
||||||
<?php $strPageCode = 'info'; ?>
|
<?php $strPageCode = 'info'; ?>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="main"}
|
{block name="main"}
|
||||||
@@ -170,8 +170,7 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
|
|||||||
<meta itemprop="position" content="3" />
|
<meta itemprop="position" content="3" />
|
||||||
</li>
|
</li>
|
||||||
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
<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"/}'
|
<a href='{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en"/}' itemprop="item">
|
||||||
itemprop="item">
|
|
||||||
<span itemprop="name">{$arrVideo.v_name}</span>
|
<span itemprop="name">{$arrVideo.v_name}</span>
|
||||||
</a>
|
</a>
|
||||||
<meta itemprop="position" content="4" />
|
<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"
|
<a class="stui-vodlist__thumb picture v-thumb"
|
||||||
href='{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en"/}'
|
href='{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en"/}'
|
||||||
title="{$arrVideo.v_name}">
|
title="{$arrVideo.v_name}">
|
||||||
<img class="lazyload"
|
<img class="lazyload" src="{$arrVideo.v_pic}">
|
||||||
src="{$arrVideo.v_pic}">
|
|
||||||
<span class="play active hidden-xs"></span>
|
<span class="play active hidden-xs"></span>
|
||||||
<span class="pic-text text-right">{$arrVideo.v_remarks}</span>
|
<span class="pic-text text-right">{$arrVideo.v_remarks}</span>
|
||||||
</a>
|
</a>
|
||||||
@@ -211,13 +209,15 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
|
|||||||
</div>
|
</div>
|
||||||
<p class="data hidden-xs">
|
<p class="data hidden-xs">
|
||||||
<span class="text-muted">类型:</span>
|
<span class="text-muted">类型:</span>
|
||||||
<a href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_parent_category}</a>
|
<a
|
||||||
<a href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_category}</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="split-line"></span>
|
||||||
<span class="text-muted">地区:</span>
|
<span class="text-muted">地区:</span>
|
||||||
{volist name='$arrVideo.v_director' id='vo' key='index'}
|
{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}
|
||||||
<span class="split-line"></span>
|
<span class="split-line"></span>
|
||||||
<span class="text-muted">年份:{$arrVideo.v_year}</span>
|
<span class="text-muted">年份:{$arrVideo.v_year}</span>
|
||||||
@@ -225,24 +225,24 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
|
|||||||
<span class="split-line"></span>
|
<span class="split-line"></span>
|
||||||
<span class="text-muted">语言:</span>
|
<span class="text-muted">语言:</span>
|
||||||
{volist name='$arrVideo.v_lang' id='vo' key='index'}
|
{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}
|
{/volist}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="data">
|
<p class="data">
|
||||||
<span class="text-muted">主演:</span>
|
<span class="text-muted">主演:</span>
|
||||||
{volist name='$arrVideo.v_actor' id='vo' key='index'}
|
{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}
|
{/volist}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="data">
|
<p class="data">
|
||||||
<span class="text-muted">导演:</span>
|
<span class="text-muted">导演:</span>
|
||||||
{volist name='$arrVideo.v_director' id='vo' key='index'}
|
{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}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -286,12 +286,14 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
|
|||||||
<?php $keyLineGroup = 0;?>
|
<?php $keyLineGroup = 0;?>
|
||||||
{foreach $arrVideo.v_play_url as $strPlayGroupName=>$arrPlayUrlType }
|
{foreach $arrVideo.v_play_url as $strPlayGroupName=>$arrPlayUrlType }
|
||||||
<?php $keyLineGroup ++ ;?>
|
<?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 ;?>
|
<?php $keyLine = 0 ;?>
|
||||||
{volist name='$arrPlayUrlType' id='arrPlayUrl'}
|
{volist name='$arrPlayUrlType' id='arrPlayUrl'}
|
||||||
<?php $keyLine ++ ;?>
|
<?php $keyLine ++ ;?>
|
||||||
<li class="{if $Request.route.intPlayIndex == $keyLine}active{/if}">
|
<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>
|
</li>
|
||||||
{/volist}
|
{/volist}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -310,8 +312,7 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
|
|||||||
</div>
|
</div>
|
||||||
<div class="stui-pannel_bd">
|
<div class="stui-pannel_bd">
|
||||||
{volist name='$arrVideo.v_seo_words' key="index" id='SeoWords' }
|
{volist name='$arrVideo.v_seo_words' key="index" id='SeoWords' }
|
||||||
<a
|
<a href='javascript:void(0)'>{$SeoWords}</a>
|
||||||
href='javascript:void(0)'>{$SeoWords}</a>
|
|
||||||
{/volist}
|
{/volist}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -329,17 +330,19 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
|
|||||||
<div class="detail col-pd">
|
<div class="detail col-pd">
|
||||||
<span class="detail-sketch">
|
<span class="detail-sketch">
|
||||||
{$arrVideo.v_name}是一部评分{$arrVideo.v_score}的
|
{$arrVideo.v_name}是一部评分{$arrVideo.v_score}的
|
||||||
<a href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_parent_category}</a>
|
<a
|
||||||
<a href='{site:vciurl parent_category="$arrVideo.v_parent_category" /}'>{$arrVideo.v_category}</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'}
|
{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}
|
||||||
,是由
|
,是由
|
||||||
{volist name='$arrVideo.v_actor' id='vo' key='index'}
|
{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}
|
{/volist}
|
||||||
主演,
|
主演,
|
||||||
{$arrVideo.v_description|raw}
|
{$arrVideo.v_description|raw}
|
||||||
@@ -417,7 +420,8 @@ href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$ar
|
|||||||
};
|
};
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
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 () {
|
trigger.addEventListener('click', function () {
|
||||||
const parent = trigger.closest('.lvshicms-vodlist__box') || trigger.parentElement;
|
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'));
|
trigger.setAttribute('aria-expanded', !description.classList.contains('txt-hidden'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|||||||
@@ -472,6 +472,104 @@ function handleUserInteractionFun(zxcvContainer, arrZxcv) {
|
|||||||
// window.onload = showRandomPopup;
|
// window.onload = showRandomPopup;
|
||||||
// window.onload = replaceList;
|
// 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 (){
|
window.onload = function (){
|
||||||
// 非蜘蛛 用户才展示广告
|
// 非蜘蛛 用户才展示广告
|
||||||
//if (!isSearchEngineBot() && arrZxcv) {
|
//if (!isSearchEngineBot() && arrZxcv) {
|
||||||
|
|||||||
@@ -662,7 +662,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
// 调用方法1
|
// 调用方法1
|
||||||
reportStats(statsData);
|
reportStats(statsData);
|
||||||
|
|
||||||
if (typeof strPlayType !== "undefined") {
|
if (typeof strPlayType !== "undefined" && boolIsPlayPage) {
|
||||||
if (strPlayType == 'default') {
|
if (strPlayType == 'default') {
|
||||||
strPlayUrl = findFirstUrl(arrPlayUrl)
|
strPlayUrl = findFirstUrl(arrPlayUrl)
|
||||||
checkLine('douban');
|
checkLine('douban');
|
||||||
@@ -672,6 +672,8 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
checkLine(strPlayType);
|
checkLine(strPlayType);
|
||||||
}
|
}
|
||||||
initDPlayer(strPlayUrl)
|
initDPlayer(strPlayUrl)
|
||||||
|
}else if(strPlayType == "default" && !boolIsPlayPage){
|
||||||
|
checkLine('douban');
|
||||||
}
|
}
|
||||||
|
|
||||||
addHistoryFun();
|
addHistoryFun();
|
||||||
@@ -680,3 +682,4 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user