diff --git a/code/app/home/view/videoBoKu/base.html b/code/app/home/view/videoBoKu/base.html index f849f54..955e66a 100644 --- a/code/app/home/view/videoBoKu/base.html +++ b/code/app/home/view/videoBoKu/base.html @@ -22,6 +22,7 @@ + {block name="head"}{/block} {block name="head-css"}{/block} @@ -202,7 +203,8 @@ - + {// 全局统计 } {site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/} diff --git a/code/app/home/view/videoDadi/base.html b/code/app/home/view/videoDadi/base.html index e182c41..e6b2388 100644 --- a/code/app/home/view/videoDadi/base.html +++ b/code/app/home/view/videoDadi/base.html @@ -18,6 +18,7 @@ + {block name="head"}{/block} {block name="head-css"}{/block} @@ -141,6 +142,8 @@ {block name="footer-js"}{/block} + {// 全局统计 } diff --git a/code/app/home/view/videoDingZhu/base.html b/code/app/home/view/videoDingZhu/base.html index 77a4d80..a9e63fd 100644 --- a/code/app/home/view/videoDingZhu/base.html +++ b/code/app/home/view/videoDingZhu/base.html @@ -16,10 +16,8 @@ - {// - - - } + + {block name="head"}{/block} {block name="head-css"}{/block} {block name="head-js"}{/block} @@ -214,7 +212,8 @@ - + {// 全局统计 } {site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/} diff --git a/code/app/home/view/videoFengNiao/base.html b/code/app/home/view/videoFengNiao/base.html index 9d04b39..ad058e3 100644 --- a/code/app/home/view/videoFengNiao/base.html +++ b/code/app/home/view/videoFengNiao/base.html @@ -16,6 +16,7 @@ + {block name="head"}{/block} {block name="head-css"}{/block} @@ -123,7 +124,8 @@ - + {// 全局统计 } {site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/} diff --git a/code/app/home/view/videoLaoNiu/base.html b/code/app/home/view/videoLaoNiu/base.html index 56cd698..b43612e 100644 --- a/code/app/home/view/videoLaoNiu/base.html +++ b/code/app/home/view/videoLaoNiu/base.html @@ -16,7 +16,7 @@ - + {block name="head"}{/block} {block name="head-css"}{/block} @@ -145,7 +145,8 @@ - + {// 全局统计 } {site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/} diff --git a/code/app/home/view/videoNuNu/base.html b/code/app/home/view/videoNuNu/base.html index 017e5b9..071a0db 100644 --- a/code/app/home/view/videoNuNu/base.html +++ b/code/app/home/view/videoNuNu/base.html @@ -17,7 +17,7 @@ - + {block name="head"}{/block} {block name="head-css"}{/block} @@ -124,7 +124,8 @@ - + {// 全局统计 } {site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/} diff --git a/code/app/home/view/videoNuNu/public/video-list-shu.html b/code/app/home/view/videoNuNu/public/video-list-shu.html index 543edc7..71d0396 100644 --- a/code/app/home/view/videoNuNu/public/video-list-shu.html +++ b/code/app/home/view/videoNuNu/public/video-list-shu.html @@ -5,11 +5,11 @@ {if !empty($arrGrm[$key + [start]])} {$arrGrm[$key+[start]]|raw} {/if} - - {$Video.v_remarks} diff --git a/code/public/public/fu/fu.css b/code/public/public/fu/fu.css new file mode 100644 index 0000000..f0ef2d1 --- /dev/null +++ b/code/public/public/fu/fu.css @@ -0,0 +1,90 @@ +/* 遮罩层样式 */ +.fu-popup-layer { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; + opacity: 0; + animation: fadeIn 0.3s ease-in forwards; +} + +/* 淡入动画 */ +@keyframes fadeIn { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} + +/* 淡出动画 */ +.fu-popup-layer.fu-closing { + animation: fadeOut 0.3s ease-out forwards; +} + +@keyframes fadeOut { + from { + opacity: 1; + } + + to { + opacity: 0; + } +} + +/* 内容容器 */ +.fu-content-box { + position: relative; + text-align: center; + max-width: 90%; + max-height: 90%; +} + +/* 图片样式 */ +.fu-content-image { + max-width: 100%; + max-height: 80vh; + cursor: pointer; + border-radius: 10px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); +} + +/* 关闭按钮 */ +.fu-close-btn { + position: absolute; + top: -15px; + right: -15px; + background: #ff4d4f; + color: white; + border: none; + border-radius: 50%; + width: 30px; + height: 30px; + font-size: 18px; + cursor: pointer; + display: flex; + justify-content: center; + align-items: center; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); +} + +.fu-close-btn:hover { + background: #d9363e; +} + +/* 标题样式 */ +.fu-content-title { + margin-top: 10px; + color: white; + font-size: 24px; + font-family: Arial, sans-serif; + text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); +} \ No newline at end of file diff --git a/code/public/public/fu/fu.js b/code/public/public/fu/fu.js new file mode 100644 index 0000000..763648d --- /dev/null +++ b/code/public/public/fu/fu.js @@ -0,0 +1,108 @@ +//data +const popupData = [ + { + image: 'https://zhaoshiping.com/img/video/2024/02/16/09/xuan-xue-xiao-nai-bao-jing-neng-yu-ce-wei-lai.webp', + title: '玄学小奶包竟能预测未来', + link: 'https://zhaoshiping.com/vod/xuan-xue-xiao-nai-bao-jing-neng-yu-ce-wei-lai-78584' + }, + { + image: 'https://zhaoshiping.com/img/video/2024/11/22/04/wu-shen-zhu-zai.webp', + title: '武神主宰', + link: 'https://zhaoshiping.com/vod/wu-shen-zhu-zai-26057' + }, + { + image: 'https://zhaoshiping.com/img/video/2023/11/26/21/xian-wu-di-zun.webp', + title: '仙武帝尊', + link: 'https://zhaoshiping.com/vod/xian-wu-di-zun-69870' + }, + { + image: 'https://zhaoshiping.com/img/video/2025/04/06/16/shen-yin-wang-zuo.webp', + title: '神印王座', + link: 'https://zhaoshiping.com/vod/shen-yin-wang-zuo-26044' + }, +]; + +// 检查和更新展示次数 +function checkPopupLimit() { + const today = new Date().toISOString().split('T')[0]; // 当前日期 YYYY-MM-DD + const popupInfo = JSON.parse(localStorage.getItem('popupInfo') || '{}'); + const lastDate = popupInfo.date; + let count = popupInfo.count || 0; + + // 如果是新的一天,重置计数 + if (lastDate !== today) { + count = 0; + popupInfo.date = today; + popupInfo.count = 0; + } + + // 检查是否达到每天3次限制 + if (count >= 3) { + return false; + } + + // 更新计数 + popupInfo.count = count + 1; + localStorage.setItem('popupInfo', JSON.stringify(popupInfo)); + return true; +} + +// 动态生成弹窗 +function createPopup(data) { + const popup = document.createElement('div'); + popup.className = 'fu-popup-layer'; + popup.id = 'popupLayer'; + + const contentBox = document.createElement('div'); + contentBox.className = 'fu-content-box'; + + const closeButton = document.createElement('button'); + closeButton.className = 'fu-close-btn'; + closeButton.innerHTML = '×'; + closeButton.onclick = closePopup; + + const image = document.createElement('img'); + image.className = 'fu-content-image'; + image.src = data.image; + image.alt = data.title; + image.onclick = () => openLink(data.link); + + const title = document.createElement('div'); + title.className = 'fu-content-title'; + title.textContent = data.title; + + contentBox.appendChild(closeButton); + contentBox.appendChild(image); + contentBox.appendChild(title); + popup.appendChild(contentBox); + document.body.appendChild(popup); +} + +// 关闭弹窗 +function closePopup() { + const popup = document.getElementById('popupLayer'); + if (popup) { + popup.classList.add('fu-closing'); + setTimeout(() => { + popup.remove(); + }, 300); // 等待淡出动画完成 + } +} + +// 打开链接 +function openLink(url) { + window.open(url, '_blank'); + closePopup(); // 点击跳转后关闭弹窗 +} + +// 随机展示广告 +function showRandomPopup() { + if (!checkPopupLimit()) { + return; // 超过3次限制,不显示 + } + const randomIndex = Math.floor(Math.random() * popupData.length); + createPopup(popupData[randomIndex]); +} + +// 页面加载时检查并展示 +window.onload = showRandomPopup; \ No newline at end of file diff --git a/code/public/template/videonunu/css/stui_block.css b/code/public/template/videonunu/css/stui_block.css index 8737055..696c1dd 100644 --- a/code/public/template/videonunu/css/stui_block.css +++ b/code/public/template/videonunu/css/stui_block.css @@ -157,7 +157,8 @@ textarea.form-control{ height: auto;} .stui_nav__taddar.fixed{ position: fixed; bottom: 0; width: 100%; padding: 5px 0 0;} /* vod-list */ -.stui-vodlist__thumb{display: block; position: relative; padding-top: 150%; background: url(../img/load.gif) no-repeat; background-position: 50% 50%; background-size: cover;} +.stui-vodlist__thumb{display: block; position: relative; padding-top: 150%;} +.stui-vodlist__thumb img{display: block; position: absolute; top:0;left:0;width: 100%;height: 100%;} .stui-vodlist__thumb.square{ padding-top: 100%; background: url(../img/load.gif) no-repeat; background-position: 50% 50%; background-size: cover;} .stui-vodlist__thumb.active{ padding-top: 60%; background: url(../img/load.gif) no-repeat; background-position: 50% 50%; background-size: cover;} .stui-vodlist__thumb.picture {background: none; overflow: hidden;}