debug
This commit is contained in:
@@ -293,7 +293,7 @@
|
||||
<?php $keyLineGroup = 0;?>
|
||||
{foreach $arrVideo.v_play_url as $strPlayGroupName=>$arrPlayUrlType }
|
||||
<?php $keyLineGroup ++ ;?>
|
||||
<li class='{eq name="$keyLineGroup" value="1"}active {/eq}' id="line_head_{$strPlayGroupName}" onclick="checkLine('{$strPlayGroupName}')">
|
||||
<li class='{eq name="$keyLineGroup" value="1"}active {/eq} play-group-head' id="line_head_{$strPlayGroupName}" onclick="checkLine('{$strPlayGroupName}')">
|
||||
<a href="javascript:;" data-toggle="tab">
|
||||
{$strPlayGroupName}
|
||||
</a>
|
||||
@@ -304,19 +304,21 @@
|
||||
</div>
|
||||
|
||||
<div class="tab-content myui-panel_bd">
|
||||
<?php $keyLine = 0;?>
|
||||
<?php $keyLineGroup = 0;?>
|
||||
{foreach $arrVideo.v_play_url as $strPlayGroupName=>$arrPlayUrlType }
|
||||
<?php $keyLine ++ ;?>
|
||||
<div id="playlist_{$strPlayGroupName}" class='tab-pane fade in clearfix {eq name="$keyLine" value="1"}active {/eq}'>
|
||||
<?php $keyLineGroup ++ ;?>
|
||||
<div id="playlist_{$strPlayGroupName}" class='tab-pane fade in clearfix play-group-list {eq name="$keyLineGroup" value="1"}active {/eq}'>
|
||||
<ul class="myui-content__list sort-list clearfix"
|
||||
style="max-height: 300px; overflow: auto;">
|
||||
{volist name='$arrPlayUrlType' id='arrPlayUrl'}
|
||||
<li class="col-lg-10 col-md-8 col-sm-6 col-xs-4">
|
||||
<a class="btn btn-default"
|
||||
href='{site:vpurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en" play_type="$strPlayGroupName" play_index="$i" /}'>
|
||||
{$arrPlayUrl.name}
|
||||
</a>
|
||||
</li>
|
||||
<?php $keyLine = 0;?>
|
||||
<?php $keyLine ++ ;?>
|
||||
{volist name='$arrPlayUrlType' id='arrPlayUrl' }
|
||||
<li class="col-lg-10 col-md-8 col-sm-6 col-xs-4">
|
||||
<a class="btn btn-default"
|
||||
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>
|
||||
@@ -441,42 +443,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
function checkLine(val){
|
||||
|
||||
//点击 通过传递过来的 当前元素id ,组建2个 id ,一个是 head id 一个是列表id
|
||||
// 1.给当前元素 添加类名 activ ,其它兄弟元素 删除 activee
|
||||
|
||||
|
||||
// 构造 ID(去掉 # 前缀)
|
||||
let strLineHeadId = `line_head_${val}`;
|
||||
let strLineListId = `playlist_${val}`;
|
||||
|
||||
// 获取 DOM 元素
|
||||
let headElement = document.getElementById(strLineHeadId);
|
||||
let listElement = document.getElementById(strLineListId);
|
||||
|
||||
// 1. 处理头部导航的 active 类
|
||||
let navItems = document.querySelectorAll('.nav-tabs li');
|
||||
navItems.forEach(item => {
|
||||
if (item.id === strLineHeadId) {
|
||||
item.classList.add('active');
|
||||
} else {
|
||||
item.classList.remove('active');
|
||||
}
|
||||
});
|
||||
|
||||
// 2. 处理播放列表的 active 类
|
||||
let tabPanes = document.querySelectorAll('.tab-content .tab-pane');
|
||||
tabPanes.forEach(pane => {
|
||||
if (pane.id === strLineListId) {
|
||||
pane.classList.add('active');
|
||||
} else {
|
||||
pane.classList.remove('active');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
|
||||
const strVideoId = `{$arrVideo.v_id}`;
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
<?php $keyLineGroup = 0;?>
|
||||
{foreach $arrVideo.v_play_url as $strPlayGroupName=>$arrPlayUrlType }
|
||||
<?php $keyLineGroup ++ ;?>
|
||||
<li class='dropdown pb10 margin-0 {eq name="$keyLineGroup" value="1"}active {/eq}'
|
||||
<li class='dropdown pb10 margin-0 play-group-head {eq name="$keyLineGroup" value="1"}active {/eq}'
|
||||
id="line_head_{$strPlayGroupName}"
|
||||
onclick="checkLine('{$strPlayGroupName}')">
|
||||
<a href='javascript:;' >
|
||||
@@ -238,15 +238,17 @@
|
||||
换线路:
|
||||
</div>
|
||||
<div class="tab-content mb10">
|
||||
<?php $keyLine = 0;?>
|
||||
<?php $keyLineGroup = 0;?>
|
||||
{foreach $arrVideo.v_play_url as $strPlayGroupName=>$arrPlayUrlType }
|
||||
<?php $keyLine ++ ;?>
|
||||
<div id="playlist_{$strPlayGroupName}" class='tab-pane fade in clearfix {eq name="$keyLine" value="1"}active {/eq}'>
|
||||
<?php $keyLineGroup ++ ;?>
|
||||
<div id="playlist_{$strPlayGroupName}" class='tab-pane fade in clearfix play-group-list {eq name="$keyLineGroup" value="1"}active {/eq}'>
|
||||
<ul class="myui-content__list playlist clearfix" id="playlist">
|
||||
{volist name='$arrPlayUrlType' id='arrPlayUrl'}
|
||||
<?php $keyLine = 0;?>
|
||||
<?php $keyLine ++ ;?>
|
||||
{volist name='$arrPlayUrlType' id='arrPlayUrl' }
|
||||
<li class="col-lg-3 col-md-2 col-sm-5 col-xs-4 active">
|
||||
<a class="btn btn-default btn-warm"
|
||||
href='{site:vpurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en" play_type="$strPlayGroupName" play_index="$i" /}'>
|
||||
href='{site:vpurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en" play_type="$strPlayGroupName" play_index="$keyLine" /}'>
|
||||
{$arrPlayUrl.name}
|
||||
</a>
|
||||
</li>
|
||||
@@ -479,42 +481,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
function checkLine(val){
|
||||
|
||||
//点击 通过传递过来的 当前元素id ,组建2个 id ,一个是 head id 一个是列表id
|
||||
// 1.给当前元素 添加类名 activ ,其它兄弟元素 删除 activee
|
||||
|
||||
|
||||
// 构造 ID(去掉 # 前缀)
|
||||
let strLineHeadId = `line_head_${val}`;
|
||||
let strLineListId = `playlist_${val}`;
|
||||
|
||||
// 获取 DOM 元素
|
||||
let headElement = document.getElementById(strLineHeadId);
|
||||
let listElement = document.getElementById(strLineListId);
|
||||
|
||||
// 1. 处理头部导航的 active 类
|
||||
let navItems = document.querySelectorAll('.nav-tabs li');
|
||||
navItems.forEach(item => {
|
||||
if (item.id === strLineHeadId) {
|
||||
item.classList.add('active');
|
||||
} else {
|
||||
item.classList.remove('active');
|
||||
}
|
||||
});
|
||||
|
||||
// 2. 处理播放列表的 active 类
|
||||
let tabPanes = document.querySelectorAll('.tab-content .tab-pane');
|
||||
tabPanes.forEach(pane => {
|
||||
if (pane.id === strLineListId) {
|
||||
pane.classList.add('active');
|
||||
} else {
|
||||
pane.classList.remove('active');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const strMaxPlayHeight = '480px'
|
||||
|
||||
Reference in New Issue
Block a user