This commit is contained in:
make
2025-05-05 00:54:34 +08:00
parent bce286a80b
commit cc61365c5d
31 changed files with 1260 additions and 700 deletions

View File

@@ -22,9 +22,13 @@
<link rel="stylesheet" href="/template/videodadi/css/mytheme-font.css" type="text/css">
<link rel="stylesheet" href="/template/videodadi/css/index.css" type="text/css">
<script>
const strPushApi = `{site:cfg code="PUSH_API_DOMAIN" encode="false"/}`;
</script>
<script src="/public/jquery/jquery-3.7.1.min.js" type="module" charset="utf-8"></script>
<!-- <script type="text/javascript" src='/template/videodadi/cctv/json.js?v={site:cfg code="STATIC_FILE_VERSION" encode="false"/}'></script> -->
<script type="text/javascript" src='/template/videodadi/cctv/index.js?v={site:cfg code="STATIC_FILE_VERSION" encode="false"/}'></script>
<script type="text/javascript" src='/public/video/common.js?v={site:cfg code="STATIC_FILE_VERSION" encode="false"/}'></script>
{block name="head"}{/block}
{block name="head-css"}{/block}
@@ -54,10 +58,10 @@
<div class="stui-header__side">
<ul class="stui-header__user">
<li>
<a style="color: rgb(218, 103, 191);" href="javascript:;">
<a style="color: rgb(218, 103, 191);" href="{$strHistoryUrlTemp}">
<i class="icon iconfont icon-clock"></i>
</a>
<div class="dropdown history">
<!-- <div class="dropdown history">
<h5 class="margin-0 text-muted">
<a style="color: rgb(202, 246, 69);" class="historyclean text-muted pull-right"
href="">清空</a>
@@ -66,7 +70,7 @@
<ul class="clearfix" id="stui_history">
<p style="padding: 80px 0; text-align: center">您还没有看过影片哦</p>
</ul>
</div>
</div> -->
</li>
</ul>
<!-- onsubmit="return qrsearch();" -->
@@ -85,23 +89,23 @@
<ul class="stui-header__menu type-slide">
<!-- 首页 -->
{if $DomainModel->info_id > 0}
<li class="{if $Request.route.strClass == ''}active{/if}">
<li class="{if $Request.route.strParentCategory == ''}active{/if}">
<a href="/">首页</a>
</li>
<li class="{if $Request.route.strClass == ''}active{/if}">
<li class="{if $Request.route.strParentCategory == ''}active{/if}">
<a href="/vindex">影视首页</a>
</li>
{else}
<li class="{if $Request.route.strClass == ''}active{/if}">
<li class="{if $Request.route.strParentCategory == ''}active{/if}">
<a href="/">首页</a>
</li>
{/if}
<!-- 动态分类导航 -->
{video:categorytype category_type="ONE" d_key="key" d_val="val"}
<li class="{if $val.v_category_en == $Request.route.strClass}active{/if}">
<li class="{if $val.v_category_en == $Request.route.strParentCategory}active{/if}">
<a
href='{site:vciurl class="$val.v_category_en" /}' >
href='{site:vciurl prent_category="$val.v_category_en" /}' >
{$val.v_category}
</a>
</li>
@@ -142,28 +146,28 @@
<script>
document.addEventListener("DOMContentLoaded", function () {
$(".stui-header__user li,.stui-header__menu li").click(function () { $(this).find(".dropdown").toggle(); });
// document.addEventListener("DOMContentLoaded", function () {
// $(".stui-header__user li,.stui-header__menu li").click(function () { $(this).find(".dropdown").toggle(); });
const lazyImages = document.querySelectorAll(".lazyload");
// const lazyImages = document.querySelectorAll(".lazyload");
const observer = new IntersectionObserver((entries, observer) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const img = entry.target;
const src = img.getAttribute("data-src");
if (src) {
img.style.backgroundImage = `url(${src})`;
img.classList.remove("lazyload");
observer.unobserve(img);
}
}
});
});
// const observer = new IntersectionObserver((entries, observer) => {
// entries.forEach(entry => {
// if (entry.isIntersecting) {
// const img = entry.target;
// const src = img.getAttribute("data-src");
// if (src) {
// img.style.backgroundImage = `url(${src})`;
// img.classList.remove("lazyload");
// observer.unobserve(img);
// }
// }
// });
// });
lazyImages.forEach(img => observer.observe(img));
});
// lazyImages.forEach(img => observer.observe(img));
// });