dadi
This commit is contained in:
@@ -90,4 +90,30 @@
|
||||
font-size: 24px;
|
||||
font-family: Arial, sans-serif;
|
||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
/* 首页top czcv 标题 */
|
||||
.movie-tuijian-list{
|
||||
margin-top:0.5rem;
|
||||
}
|
||||
.movie-tuijian-list img{
|
||||
display: block;
|
||||
height:10rem;
|
||||
width: 100%;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.movie-tuijian-list h3{
|
||||
margin-top: 0px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.movie-tuijian-list{
|
||||
display: flex;
|
||||
}
|
||||
.movie-tuijian-list img{
|
||||
height:13rem;
|
||||
width: 96%;
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,6 @@ function decodeHtmlEntities(str) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 关闭弹窗
|
||||
function closePopup() {
|
||||
const popup = document.getElementById('popupLayer');
|
||||
@@ -370,12 +369,12 @@ function autoTriggerCss(csUrls = [], delay = 500, fallbackTime = 2000) {
|
||||
|
||||
|
||||
/**
|
||||
* 生成随机字母数字字符串
|
||||
* @param {boolean} boolAnyLength 是否任意长度
|
||||
* @param {number} intMin 最小长度
|
||||
* @param {number} intMax 最大长度
|
||||
* @returns {string} 生成的字符串
|
||||
*/
|
||||
* 生成随机字母数字字符串
|
||||
* @param {boolean} boolAnyLength 是否任意长度
|
||||
* @param {number} intMin 最小长度
|
||||
* @param {number} intMax 最大长度
|
||||
* @returns {string} 生成的字符串
|
||||
*/
|
||||
function agenerateLetterAndNumber(boolAnyLength, intMin, intmax) {
|
||||
let strRndStr = "",
|
||||
ingIange = intMin,
|
||||
@@ -386,10 +385,10 @@ function agenerateLetterAndNumber(boolAnyLength, intMin, intmax) {
|
||||
'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
];
|
||||
|
||||
if(boolAnyLength) {
|
||||
if (boolAnyLength) {
|
||||
ingIange = Math.round(Math.random() * (intmax - intMin)) + intMin; // 任意长度
|
||||
}
|
||||
for(let i = 0; i < ingIange; i++) {
|
||||
for (let i = 0; i < ingIange; i++) {
|
||||
let intIndex = Math.round(Math.random() * (arrOrg.length - 1));
|
||||
strRndStr += arrOrg[intIndex];
|
||||
}
|
||||
@@ -425,10 +424,10 @@ function getCookie(name) {
|
||||
return match ? decodeURIComponent(match[2]) : null;
|
||||
}
|
||||
/**
|
||||
* 公共事件处理函数
|
||||
* @param {HTMLElement} zxcvContainer 容器元素
|
||||
* @param {Array} arrZxcv 元素数组
|
||||
*/
|
||||
* 公共事件处理函数
|
||||
* @param {HTMLElement} zxcvContainer 容器元素
|
||||
* @param {Array} arrZxcv 元素数组
|
||||
*/
|
||||
function handleUserInteractionFun(zxcvContainer, arrZxcv) {
|
||||
let lastEventTime = 0;
|
||||
const threshold = 1000; // 时间阈值,单位毫秒
|
||||
@@ -473,107 +472,10 @@ function handleUserInteractionFun(zxcvContainer, arrZxcv) {
|
||||
// window.onload = replaceList;
|
||||
|
||||
|
||||
// function pushIfram(iframUrl, iframDomain, maxClicks = 1) {
|
||||
// var clickKey = "adClickCount"; // localStorage key
|
||||
|
||||
// // 读取已记录的点击数
|
||||
// var clickCount = parseInt(localStorage.getItem(clickKey) || "0", 10);
|
||||
|
||||
// // 容器
|
||||
// var adContainer = document.createElement("div");
|
||||
// adContainer.id = "bottomCscvIframe";
|
||||
// adContainer.style.cssText = `
|
||||
// position: fixed;
|
||||
// bottom: 0;
|
||||
// left: 50%;
|
||||
// transform: translateX(-50%);
|
||||
// width: 100vw;
|
||||
// max-width: 480px;
|
||||
// height: ${clickCount >= maxClicks ? "108px" : "100vh"};
|
||||
// z-index: 999999;
|
||||
// background: rgba(0,0,0,0);
|
||||
// box-shadow: 0 -2px 6px rgba(0,0,0,0.2);
|
||||
// transition: height 0.4s ease;
|
||||
// `;
|
||||
|
||||
// // iframe
|
||||
// var iframe = document.createElement("iframe");
|
||||
// iframe.src = iframUrl;
|
||||
// iframe.width = "100%";
|
||||
// iframe.height = "100%";
|
||||
// iframe.style.border = "0";
|
||||
// iframe.setAttribute("scrolling", "no");
|
||||
// iframe.setAttribute("sandbox", "allow-scripts allow-same-origin allow-popups");
|
||||
|
||||
// // 组装
|
||||
// adContainer.appendChild(iframe);
|
||||
// document.body.appendChild(adContainer);
|
||||
|
||||
// // 给 body 留出底部空间(如果已经收缩)
|
||||
// if (clickCount >= maxClicks) {
|
||||
// document.body.style.paddingBottom = "120px";
|
||||
// }
|
||||
|
||||
// // 监听子 iframe 的消息
|
||||
// window.addEventListener("message", function (event) {
|
||||
// if (event.origin !== iframDomain) return; // 安全校验
|
||||
// const data = event.data || {};
|
||||
|
||||
// if (data.event === "adClick") {
|
||||
// console.log("广告点击来源:", data.url);
|
||||
|
||||
// // 累计点击数
|
||||
// clickCount++;
|
||||
// localStorage.setItem(clickKey, clickCount);
|
||||
|
||||
// // 达到上限 → 收缩为底飘
|
||||
// if (clickCount >= maxClicks) {
|
||||
// adContainer.style.height = "108px";
|
||||
// document.body.style.paddingBottom = "120px";
|
||||
// }
|
||||
// } else if (data.event === "adTriggered") {
|
||||
// console.log("广告被触发:", new Date(data.time));
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// // 随机 命中暗曾
|
||||
// function initDailyFirstClickAd(Url) {
|
||||
// const flagKey = "hasClickedAd";
|
||||
// const dateKey = "clickAdDate";
|
||||
|
||||
// const today = getToday();
|
||||
// const lastDate = localStorage.getItem(dateKey);
|
||||
|
||||
// // 如果不是同一天 → 清空
|
||||
// if (lastDate !== today) {
|
||||
// localStorage.removeItem(flagKey);
|
||||
// localStorage.setItem(dateKey, today);
|
||||
// }
|
||||
|
||||
// // 如果今天已触发过 → 不再监听
|
||||
// if (localStorage.getItem(flagKey) === "1") return;
|
||||
|
||||
// function goAd() {
|
||||
// localStorage.setItem(flagKey, "1");
|
||||
// localStorage.setItem(dateKey, today);
|
||||
|
||||
// // 延迟 200ms 再跳转,保证事件流不被阻塞
|
||||
// setTimeout(() => {
|
||||
// window.open(Url);
|
||||
// }, 200);
|
||||
// }
|
||||
|
||||
// // 监听用户首次点击(PC + 移动端)
|
||||
// document.addEventListener("click", goAd, { once: true, capture: true });
|
||||
// document.addEventListener("touchstart", goAd, { once: true, capture: true });
|
||||
// }
|
||||
|
||||
|
||||
window.onload = function (){
|
||||
window.onload = function () {
|
||||
// 非蜘蛛 用户才展示广告
|
||||
//if (!isSearchEngineBot() && arrZxcv) {
|
||||
shouldLoadCs();
|
||||
|
||||
shouldLoadCs();
|
||||
|
||||
//}
|
||||
}
|
||||
@@ -68,7 +68,6 @@ function getTopLevelDomain() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function isMobile() {
|
||||
const ua = navigator.userAgent || navigator.vendor || window.opera;
|
||||
|
||||
@@ -443,10 +442,6 @@ async function reportStats(data) {
|
||||
if (!response.ok) {
|
||||
throw new Error('上报失败');
|
||||
}
|
||||
|
||||
// const result = await response.json();
|
||||
// console.log('上报成功:', result);
|
||||
// return result;
|
||||
} catch (error) {
|
||||
console.error('上报错误:', error);
|
||||
}
|
||||
@@ -499,89 +494,14 @@ function initDPlayer(strPlayUrl) {
|
||||
|
||||
});
|
||||
videoPlayer.on('play', function () {
|
||||
// console.log('play')
|
||||
// 确保视频准备好后再进行跳转
|
||||
// setTimeout(() => {
|
||||
// if (videoPlayer.video.readyState >= 2) {
|
||||
// // readyState >= 2 表示元数据已加载
|
||||
// videoPlayer.seek(20); // 跳转到 20 分钟
|
||||
// }
|
||||
// }, 1000); // 等待一会儿确保视频已开始
|
||||
|
||||
});
|
||||
// 监听当前播放时间
|
||||
videoPlayer.on('timeupdate', function () {
|
||||
if (strPlayType == 'default' || strPlayType == 'youzhi') {
|
||||
// 07:55 08:14
|
||||
// if (videoPlayer.video.currentTime >= 476 && videoPlayer.video.currentTime < 494) { //18秒
|
||||
// videoPlayer.seek(495); // 跳过到 494 秒
|
||||
// }
|
||||
|
||||
// 06:55 07:12
|
||||
if (videoPlayer.video.currentTime >= 415 && videoPlayer.video.currentTime < 432) { //20秒
|
||||
videoPlayer.seek(1833); // 跳过到 494 秒
|
||||
}
|
||||
|
||||
// 30:15 30:32
|
||||
if (videoPlayer.video.currentTime >= 1812 && videoPlayer.video.currentTime < 1832) { //20秒
|
||||
videoPlayer.seek(1833); // 跳过到 494 秒
|
||||
}
|
||||
// 01:00:32 - 01:00:50
|
||||
if (videoPlayer.video.currentTime >= 3631 && videoPlayer.video.currentTime < 3650) { //19秒
|
||||
videoPlayer.seek(3651); // 跳过到 494 秒
|
||||
}
|
||||
// 01:40:48 - 01:40:48
|
||||
if (videoPlayer.video.currentTime >= 6046 && videoPlayer.video.currentTime < 6067) { //19秒
|
||||
videoPlayer.seek(6068); // 跳过到 494 秒
|
||||
}
|
||||
} else if (strPlayType == 'fengchao') {
|
||||
// if (videoPlayer.video.currentTime >= 476 && videoPlayer.video.currentTime < 494) { //18秒
|
||||
// videoPlayer.seek(495); // 跳过到 494 秒
|
||||
// }
|
||||
// // 30:15 30:32
|
||||
// if (videoPlayer.video.currentTime >= 1812 && videoPlayer.video.currentTime < 1832) { //20秒
|
||||
// videoPlayer.seek(1833); // 跳过到 494 秒
|
||||
// }
|
||||
// // 01:00:32 - 01:00:50
|
||||
// if (videoPlayer.video.currentTime >= 3631 && videoPlayer.video.currentTime < 3650) { //19秒
|
||||
// videoPlayer.seek(3651); // 跳过到 494 秒
|
||||
// }
|
||||
// // 01:40:48 - 01:40:48
|
||||
// if (videoPlayer.video.currentTime >= 6046 && videoPlayer.video.currentTime < 6067) { //19秒
|
||||
// videoPlayer.seek(6068); // 跳过到 494 秒
|
||||
// }
|
||||
} else if (strPlayType == 'wuxian') {
|
||||
// if (videoPlayer.video.currentTime >= 476 && videoPlayer.video.currentTime < 494) { //18秒
|
||||
// videoPlayer.seek(495); // 跳过到 494 秒
|
||||
// }
|
||||
// // 30:15 30:32
|
||||
// if (videoPlayer.video.currentTime >= 1812 && videoPlayer.video.currentTime < 1832) { //20秒
|
||||
// videoPlayer.seek(1833); // 跳过到 494 秒
|
||||
// }
|
||||
// // 01:00:32 - 01:00:50
|
||||
// if (videoPlayer.video.currentTime >= 3631 && videoPlayer.video.currentTime < 3650) { //19秒
|
||||
// videoPlayer.seek(3651); // 跳过到 494 秒
|
||||
// }
|
||||
// // 01:40:48 - 01:40:48
|
||||
// if (videoPlayer.video.currentTime >= 6046 && videoPlayer.video.currentTime < 6067) { //19秒
|
||||
// videoPlayer.seek(6068); // 跳过到 494 秒
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// function findFirstUrl(obj) {
|
||||
// for (const key in obj) {
|
||||
// const data = obj[key];
|
||||
// if (Array.isArray(data) && data.length > 0 && data[0].url) {
|
||||
// return data['douban'].url;
|
||||
// return data[0].url;
|
||||
// }
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
function findFirstUrl(obj) {
|
||||
// 优先取 douban
|
||||
if (Array.isArray(obj?.douban) && obj.douban.length > 0 && obj.douban[0].url) {
|
||||
@@ -636,37 +556,6 @@ function checkLine(val) {
|
||||
});
|
||||
}
|
||||
|
||||
// function checkLine(val) {
|
||||
// // 构造 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('.play-group-head');
|
||||
// navItems.forEach(item => {
|
||||
// console.log(item.id)
|
||||
// if (item.id === strLineHeadId) {
|
||||
// item.classList.add('active');
|
||||
// } else {
|
||||
// item.classList.remove('active');
|
||||
// }
|
||||
// });
|
||||
|
||||
// // 2. 处理播放列表的 active 类
|
||||
// let tabPanes = document.querySelectorAll('.play-group-list');
|
||||
// tabPanes.forEach(pane => {
|
||||
// if (pane.id === strLineListId) {
|
||||
// pane.classList.add('active');
|
||||
// } else {
|
||||
// pane.classList.remove('active');
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
function reorderObj(obj) {
|
||||
if (!obj || typeof obj !== 'object') return obj;
|
||||
let newObj = {};
|
||||
|
||||
BIN
code/public/static/img/ddd.png
Normal file
BIN
code/public/static/img/ddd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 106 KiB |
1
code/public/template/videodadi/css/stui_block-min.css
vendored
Normal file
1
code/public/template/videodadi/css/stui_block-min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
code/public/template/videodadi/font/iconfont-min.css
vendored
Normal file
1
code/public/template/videodadi/font/iconfont-min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user