This commit is contained in:
make
2025-05-11 13:51:57 +08:00
parent dcde3b826c
commit e6ac75cda1
31 changed files with 1580 additions and 1459 deletions

View File

@@ -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'