This commit is contained in:
make
2025-05-05 13:09:19 +08:00
parent cc61365c5d
commit 925000f736
9 changed files with 104 additions and 183 deletions

View File

@@ -26,9 +26,8 @@
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>
<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}
@@ -39,9 +38,6 @@
</script>
</head>
<!-- 高权重站排名 -->
<body>
<header class="stui-header__top clearfix top-fixed headroom--top headroom--not-bottom" id="header-top">
<div class="container">
@@ -49,9 +45,9 @@
<div class="stui-header_bd clearfix">
<h2 class="stui-header__logo">
{if $DomainModel->d_logo_type == 1}
<a style="color: rgb(146, 198, 165);" class="logo" href="/"></a>
<a style="color: rgb(146, 198, 165);" class="logo" href="/"></a>
{else}
<a class="logo-text" href="/">{$DomainModel->d_name}</a>
<a class="logo-text" href="/">{$DomainModel->d_name}</a>
{/if}
</h2>
@@ -61,22 +57,10 @@
<a style="color: rgb(218, 103, 191);" href="{$strHistoryUrlTemp}">
<i class="icon iconfont icon-clock"></i>
</a>
<!-- <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>
播放记录
</h5>
<ul class="clearfix" id="stui_history">
<p style="padding: 80px 0; text-align: center">您还没有看过影片哦</p>
</ul>
</div> -->
</li>
</ul>
<!-- onsubmit="return qrsearch();" -->
<div class="stui-header__search">
<form id="search" name="search" method="get" action="{$strSearchListUrlTemp}"
>
<form id="search" name="search" method="get" action="{$strSearchListUrlTemp}">
<input type="text" name="keyword" class="mac_wd form-control mac_input" value=""
placeholder="请输入关键词..." autocomplete="off">
<button class="submit" id="searchbutton" type="submit">
@@ -93,26 +77,25 @@
<a href="/">首页</a>
</li>
<li class="{if $Request.route.strParentCategory == ''}active{/if}">
<a href="/vindex">影视首页</a>
<a href="/vindex">影视首页</a>
</li>
{else}
<li class="{if $Request.route.strParentCategory == ''}active{/if}">
<a href="/">首页</a>
<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.strParentCategory}active{/if}">
<a
href='{site:vciurl prent_category="$val.v_category_en" /}' >
<a href='{site:vciurl prent_category="$val.v_category_en" /}'>
{$val.v_category}
</a>
</li>
{/video:categorytype}
<li >
<a href="{$strRankUrlTemp}">排行榜</a>
<li>
<a href="{$strRankUrlTemp}">排行榜</a>
</li>
</ul>
@@ -145,37 +128,6 @@
{/block}
<script>
// document.addEventListener("DOMContentLoaded", function () {
// $(".stui-header__user li,.stui-header__menu li").click(function () { $(this).find(".dropdown").toggle(); });
// 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);
// }
// }
// });
// });
// lazyImages.forEach(img => observer.observe(img));
// });
</script>
<!-- 全局统计 -->
{site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/}

View File

@@ -17,21 +17,74 @@
<!-- 结构化数据 -->
<script type="application/ld+json">
[
{
"@type": "WebSite",
"name": "{$DomainModel->d_name}",
"url": "https://{$DomainModel->d_domain}",
"alternateName": "{$DomainModel->d_domain}",
"description": "{site:replace code="VIDEO@INDEX@INDEX@DESCRIPTION"}",
"potentialAction": {
"@type": "SearchAction",
"target": 'https://{$DomainModel->d_domain}{site:vsurl key="search_term_string" p="1"/}",
"query-input": "required name=search_term_string"
}
},
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "{$DomainModel->d_name}",
"url": "https://{$DomainModel->d_domain}",
"headline": '{site:replace code="VIDEO@INDEX@INDEX@TITLE"}',
"description": '{site:replace code="VIDEO@INDEX@INDEX@DESCRIPTION"}',
"datePublished": "{:date('Y-m-d')}"
"@type": "VideoObject",
"name": "{$DomainModel->d_name}热门推荐预告片",
"description": "观看{$DomainModel->d_name}最新电影和电视剧的精彩预告片!",
"thumbnailUrl": "https://video1.com/img/video/2024/12/18/17/ai-qing-sheng-huo-di-er-ji.webp",
"uploadDate": "2025-05-05",
"duration": "m3u8",
"publisher": {
"@type": "Organization",
"name": "{$DomainModel->d_name}"
}
},
{
"@type": "CollectionPage",
"name": "{$DomainModel->d_name} - 免费高清影视在线观看",
"url": "https://{$DomainModel->d_domain}",
"alternateName": "{$DomainModel->d_domain}",
"description": "{$DomainModel->d_name}首页提供最新电影、电视剧、综艺、动漫和短剧的免费高清在线观看,热门推荐每日更新!",
"mainEntity": {
"@type": "ItemList",
"itemListElement": [
"potentialAction": {
"@type": "SearchAction",
"target": 'https://{$DomainModel->d_domain}',
"query-input": "required name=search_term_string"
}
}
{video:list count="2" sort_type="tuijian" d_key="key" d_val="Video" cache_life="86400"}
{
"@type": "ListItem",
"position": {$key+=1},
"item": {
"@type": "TVSeries",
"name": "{$Video.v_name}",
"url": "https://video1.com/voddetail/ai-qing-sheng-huo-di-er-ji-115959",
"description": "{$Video.v_description}",
"actor": [
{foreach $Video.v_actor as $strActorKey=>$strActor }
{if $strActorKey < 5 }
{ "@type": "Person", "name": "{$strActor}" },
{/if}
{/foreach}
],
"numberOfEpisodes": {$Video.v_play_url|count},
"image": "{$Video.v_pic}",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "7.5",
"reviewCount": "1200"
}
}
},
{/video:list}
]
}
}
]
</script>
@@ -44,7 +97,7 @@
<div class="container">
<h1 class="view-title">
<a href="/" >{$DomainModel->d_name}</a>-{$DomainModel->d_text_logo}
<a href="/">{$DomainModel->d_name}</a>-{$DomainModel->d_text_logo}
</h1>
<h4 class="view-description">{site:replace code="VIDEO@GETCATEGORYINDEX@TEXT"}</h4>
@@ -57,24 +110,24 @@
<div class="col-lg-wide-75 col-xs-1 padding-0">
<div class="stui-pannel_hd">
<div class="stui-pannel__head active bottom-line clearfix">
<a style="color: rgb(255, 0, 0);" class="more text-muted pull-right"
href='{site:vclurl class="all" category="all" area="all" lang="all" year="all" order="tuijian" page="1"/}'>更多<i
<a class="more text-muted pull-right"
href='{site:vclurl parent_category="all" category="all" area="all" lang="all" year="all" order="tuijian" page="1"/}'>更多<i
class="icon iconfont icon-more"></i></a>
<h3 class="title">
<h2 class="title">
<img src="/template/videodadi/icon/icon_12.png">
<a
href='{site:vclurl class="all" category="all" area="all" lang="all" year="all" order="tuijian" page="1"/}'>火爆推荐</a>
</h3>
href='{site:vclurl parent_category="all" category="all" area="all" lang="all" year="all" order="tuijian" page="1"/}'>火爆推荐</a>
</h2>
</div>
</div>
<ul class="stui-vodlist clearfix">
{video:list count="12" sort_type="tuijian" d_key="d_key" d_val="Video" cache_life="86400"}
{video:list count="2" sort_type="tuijian" d_key="d_key" d_val="Video" cache_life="86400"}
{include file="public/video-list-shu" /}
{/video:list}
</ul>
<ul class="stui-vodlist__text col-pd clearfix hidden-xs">
{video:list count="12" sort_type="tuijian" d_key="d_key" d_val="Video" cache_life="86400"}
{video:list count="2" sort_type="tuijian" d_key="d_key" d_val="Video" cache_life="86400"}
{include file="public/video-list-shu-end-text" /}
{/video:list}
</ul>
@@ -90,9 +143,9 @@
</div>
</div>
<ul class="stui-vodlist__text active col-pd clearfix">
{video:list count="18"
{video:list count="2"
sort_type="piaofang"
d_key="key" d_val="Video" cache_life="86400"}
d_key="key" d_val="Video" cache_life="86400"}
{include file="public/video-list-phb2" /}
{/video:list}
</ul>

View File

@@ -9,10 +9,10 @@
<span class="pic-text text-right"></span>
</a>
<div class="stui-vodlist__detail">
<h2 class="title text-overflow">
<h3 class="title text-overflow">
<a
href='{site:vurl v_id="$Video.v_id" v_py="$Video.v_name_en"/}' title="{$Video.v_name}">{$Video.v_name}</a>
</h2>
</h3>
<div class="text text-overflow text-muted hidden-xs">
{$Video.v_description|raw}
</div>

View File

@@ -5,8 +5,8 @@
<div class="col-lg-wide-75 col-xs-1 padding-0">
<div class="stui-pannel_hd">
<div class="stui-pannel__head active bottom-line clearfix">
<a style="color: rgb(255, 0, 0);" class="more text-muted pull-right"
href='{site:vclurl class="$val.v_category_en" category="all" area="all" lang="all" year="all" order="all" page="1"/}'>更多<i
<a class="more text-muted pull-right"
href='{site:vclurl parent_category="$val.v_category_en" category="all" area="all" lang="all" year="all" order="all" page="1"/}'>更多<i
class="icon iconfont icon-more"></i></a>
<h3 class="title">
<img src="/template/videodadi/icon/icon_{$val.v_category_en}.png">
@@ -21,12 +21,12 @@
</div>
</div>
<ul class="stui-vodlist clearfix">
{video:list count="12" v_category="$val.v_category_en" sort_type="news" d_key="key" d_val="Video" cache_life="86400"}
{video:list count="2" v_category="$val.v_category_en" sort_type="news" d_key="key" d_val="Video" cache_life="86400"}
{include file="public/video-list-shu" /}
{/video:list}
</ul>
<ul class="stui-vodlist__text col-pd clearfix hidden-xs">
{video:list count="12" v_category="$val.v_category_en" sort_type="news" d_key="key" d_val="Video" cache_life="86400"}
{video:list count="2" v_category="$val.v_category_en" sort_type="news" d_key="key" d_val="Video" cache_life="86400"}
{include file="public/video-list-shu-end-text" /}
{/video:list}
</ul>
@@ -42,7 +42,7 @@
</div>
</div>
<ul class="stui-vodlist__text active col-pd clearfix">
{video:ranklist count="18"
{video:ranklist count="2"
v_category_en="$val.v_category_en"
sort_type="weekly"
d_key="key" d_val="Video" cache_life="86400"}

View File

@@ -122,7 +122,7 @@
<span class="split-line"></span>
<span class="text-muted hidden-xs">年份:</span>
<a style="color: rgb(102, 158, 132)"
href='{site:vclurl class="all" category="all" area="all" lang="all" year="$arrVideo.v_year" order="all" page="1"/}'>{$arrVideo.v_year}</a>
href='{site:vclurl parent_category="all" category="all" area="all" lang="all" year="$arrVideo.v_year" order="all" page="1"/}'>{$arrVideo.v_year}</a>
&nbsp;
</p>
<p class="data">

View File

@@ -202,7 +202,7 @@
<span class="split-line"></span>
<span class="text-muted">年份:</span>
<a style="color: rgb(102, 158, 132)"
href='{site:vclurl class="all" category="all" area="all" lang="all" year="$arrVideo.v_year" order="all" page="1"/}'>{$arrVideo.v_year}</a>
href='{site:vclurl parent_category="all" category="all" area="all" lang="all" year="$arrVideo.v_year" order="all" page="1"/}'>{$arrVideo.v_year}</a>
&nbsp;
</p>
</div>

View File

@@ -1,78 +0,0 @@
document.addEventListener("DOMContentLoaded", function () {
// setTimeout(function () {
// if (CctvTopHf && CctvTopHf.length > 0) {
// var CctvTopHfDom = document.querySelector('.cctv-hf-list-top .swiper-wrapper '); // 获取容器元素
// // 遍历数组并生成 HTML
// CctvTopHf.forEach(function (ad) {
// var html = `
// <div class="swiper-slide" style="max-height:10rem">
// <a href="${ad.href}" target="_blank">
// <img src="${ad.img}" style="display: block;width:100%;max-height:10rem" alt="">
// </a>
// </div>
// `;
// CctvTopHfDom.innerHTML += html; // 将 HTML 添加到容器中
// });
// }
// }, 1500)
});
function history() {
if ($("#stui_history").length) {
let historyData = localStorage.getItem("recente");
let list = "";
if (historyData) {
let json = JSON.parse(historyData);
console.log("本地存储数据:", json);
for (let i = 0; i < json.length; i++) {
list += `<li class='top-line'>
<a href='${json[i].vod_url}' title='${json[i].vod_name}'>
<span class='pull-right text-red'>${json[i].vod_part}</span>
${json[i].vod_name}
</a>
</li>`;
}
} else {
list = "<p style='padding: 80px 0; text-align: center'>您还没有看过影片哦</p>";
}
$("#stui_history").html(list);
// 清空历史记录
$(".historyclean").on("click", function () {
localStorage.removeItem("recente");
$("#stui_history").html("<p style='padding: 80px 0; text-align: center'>您还没有看过影片哦</p>");
});
}
}
// 添加新历史记录
function addHistory(vod_name, vod_url, vod_part) {
let historyData = localStorage.getItem("recente");
let historyList = historyData ? JSON.parse(historyData) : [];
// 查找是否已有该视频
let index = historyList.findIndex(item => item.vod_name === vod_name);
if (index !== -1) {
// 如果已存在,更新集数
historyList[index].vod_part = vod_part;
historyList[index].vod_url = vod_url; // 可能最新观看的是其他来源
} else {
// 追加新记录(最多存 10 条)
if (historyList.length >= 10) {
historyList.shift(); // 移除最早的一条
}
historyList.push({ vod_name, vod_url, vod_part });
}
localStorage.setItem("recente", JSON.stringify(historyList));
}

View File

@@ -1,6 +0,0 @@
var CctvTopHf = [
{
'img' :'/assets/images/zxtv/375-50.png',
'href' : 'https://baidu.com'
}
];

View File

@@ -456,7 +456,7 @@ textarea.form-control{ height: auto;}
.stui-pannel__head.active{height: 30px;}
.stui-pannel__head .title,.stui-pannel__head .title a{font-size: 16px;}
.stui-pannel__head .title img{ width: 18px; height: 18px; margin-right: 5px; vertical-align: -3px;}
.stui-pannel__head .more{ line-height: 20px;}
.stui-pannel__head .more{ line-height: 20px;color: #ff9900;}
/* vod-list */
.stui-vodlist__thumb .tag{ padding: 0 5px;}