debug
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
|
||||
{block name="get-data"}
|
||||
|
||||
{if $Request.route.intVideoId}
|
||||
{video:info v_id="$Request.route.intVideoId" n_key="arrVideo" n_forge_id="$Request.route.intForgeId" /}
|
||||
{if $Request.route.intVId}
|
||||
{video:info v_id="$Request.route.intVId" n_key="arrVideo" n_forge_id="$Request.route.intForgeId" /}
|
||||
{else}
|
||||
{video:info v_id="$DomainModel->info_id" n_key="arrVideo" n_forge_id="0" /}
|
||||
{/if}
|
||||
@@ -13,27 +13,27 @@
|
||||
{/block}
|
||||
|
||||
{block name="title"}
|
||||
{if $DomainModel->info_id == $Request.route.intVideoId || empty($Request.route.intVideoId)}
|
||||
{if $DomainModel->info_id == $Request.route.intVId || empty($Request.route.intVId)}
|
||||
{site:replace code="INDEX@INDEX@TITLE"}
|
||||
{else}
|
||||
{site:replace code="NOVEL@GETNOVELINFO@TITLE" diff="$Request.route.intVideoId" /}
|
||||
{site:replace code="VIDEO@GETVIDEOINFO@TITLE" diff="$Request.route.intVId" /}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
|
||||
{block name="keywords"}
|
||||
{if $DomainModel->info_id == $Request.route.intVideoId || empty($Request.route.intVideoId)}
|
||||
{if $DomainModel->info_id == $Request.route.intVId || empty($Request.route.intVId)}
|
||||
{site:replace code="INDEX@INDEX@KEYWORDS"}
|
||||
{else}
|
||||
{site:replace code="NOVEL@GETNOVELINFO@KEYWORDS" diff="$Request.route.intVideoId"}
|
||||
{site:replace code="VIDEO@GETVIDEOINFO@KEYWORDS" diff="$Request.route.intVId"}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="description"}
|
||||
{if $DomainModel->info_id == $Request.route.intVideoId || empty($Request.route.intVideoId)}
|
||||
{if $DomainModel->info_id == $Request.route.intVId || empty($Request.route.intVId)}
|
||||
{site:replace code="INDEX@INDEX@DESCRIPTION"}
|
||||
{else}
|
||||
{site:replace code="NOVEL@GETNOVELINFO@DESCRIPTION" diff="$Request.route.intVideoId"}
|
||||
{site:replace code="VIDEO@GETVIDEOINFO@DESCRIPTION" diff="$Request.route.intVId"}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
@@ -271,14 +271,30 @@
|
||||
|
||||
{block name="customize"}
|
||||
<script>
|
||||
function findFirstUrl(obj) {
|
||||
for (const key in obj) {
|
||||
const data = obj[key];
|
||||
if (Array.isArray(data) && data.length > 0 && data[0].url) {
|
||||
return data[0].url;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var intPlayUrlIndex = '{$Request.route.intPlayIndex}'
|
||||
var strPlayType = '{$Request.route.strPlayType}'
|
||||
var intJumpTimeFirst = 1;
|
||||
var intJumpTimeTwoStart = 1;
|
||||
var intJumpTimeTwoEnd = 1;
|
||||
var arrPlayUrl = {:json_encode($arrVideo.v_play_url)};
|
||||
var ActivePlayUrl = arrPlayUrl[strPlayType][intPlayUrlIndex - 1]
|
||||
var strPlayUrl = ActivePlayUrl.url
|
||||
var strPlayUrl = ""
|
||||
|
||||
if(strPlayType == 'default'){
|
||||
strPlayUrl = findFirstUrl(arrPlayUrl)
|
||||
}else{
|
||||
var ActivePlayUrl = arrPlayUrl[strPlayType][intPlayUrlIndex - 1]
|
||||
strPlayUrl = ActivePlayUrl.url
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
console.log(strPlayUrl)
|
||||
|
||||
Reference in New Issue
Block a user