视频站点优化
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
<link rel="stylesheet" href="/template/videoboku/css/mytheme-color1.css" type="text/css" name="skin" disabled="">
|
||||
<link rel="stylesheet" href="/template/videoboku/css/mytheme-color2.css" type="text/css" name="skin" disabled="">
|
||||
<link rel="stylesheet" href="/template/videoboku/css/mytheme-color3.css" type="text/css" name="skin" disabled="">
|
||||
<link rel="stylesheet" href="/public/fu/fu.css" type="text/css">
|
||||
|
||||
{block name="head"}{/block}
|
||||
{block name="head-css"}{/block}
|
||||
@@ -202,7 +203,8 @@
|
||||
|
||||
<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/fu/fu.js?v={site:cfg code="STATIC_FILE_VERSION" encode="false"/}'></script>
|
||||
|
||||
{// 全局统计 }
|
||||
{site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<link rel="stylesheet" href="/template/videodadi/font/iconfont.css" type="text/css">
|
||||
<link rel="stylesheet" href="/template/videodadi/css/stui_block.css" type="text/css">
|
||||
<link rel="stylesheet" href="/template/videodadi/css/mytheme-font.css" type="text/css">
|
||||
<link rel="stylesheet" href="/public/fu/fu.css" type="text/css">
|
||||
|
||||
{block name="head"}{/block}
|
||||
{block name="head-css"}{/block}
|
||||
@@ -141,6 +142,8 @@
|
||||
{block name="footer-js"}{/block}
|
||||
<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/fu/fu.js?v={site:cfg code="STATIC_FILE_VERSION" encode="false"/}'></script>
|
||||
|
||||
|
||||
{// 全局统计 }
|
||||
|
||||
@@ -16,10 +16,8 @@
|
||||
<link rel="stylesheet" href="/template/videodingzhu/css/plugins.css" type="text/css">
|
||||
<link rel="stylesheet" href="/template/videodingzhu/css/global.css" type="text/css">
|
||||
<link rel="stylesheet" href="/template/videodingzhu/css/style.css" type="text/css">
|
||||
{//
|
||||
<!-- <link rel="stylesheet" href="/template/videodingzhu/css/color.css" type="text/css" name="default"> -->
|
||||
<!-- <link rel="stylesheet" href="/public/layer/layer.css?v=3.5.1" id="layuicss-layer"> -->
|
||||
}
|
||||
<link rel="stylesheet" href="/public/fu/fu.css" type="text/css">
|
||||
|
||||
{block name="head"}{/block}
|
||||
{block name="head-css"}{/block}
|
||||
{block name="head-js"}{/block}
|
||||
@@ -214,7 +212,8 @@
|
||||
|
||||
<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/fu/fu.js?v={site:cfg code="STATIC_FILE_VERSION" encode="false"/}'></script>
|
||||
{// 全局统计 }
|
||||
{site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<link href="/template/videofengniao/css/app2.css" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href='/template/videofengniao/static_ban/base_common.css?v={site:cfg code="STATIC_FILE_VERSION" encode="false"/}'>
|
||||
<link rel="stylesheet" href="/public/fu/fu.css" type="text/css">
|
||||
|
||||
{block name="head"}{/block}
|
||||
{block name="head-css"}{/block}
|
||||
@@ -123,7 +124,8 @@
|
||||
<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/fu/fu.js?v={site:cfg code="STATIC_FILE_VERSION" encode="false"/}'></script>
|
||||
{// 全局统计 }
|
||||
{site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="/template/videolaoniu/css/swiper-bundle.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/template/videolaoniu/css/global.css">
|
||||
<link rel="stylesheet" type="text/css" href="/template/videolaoniu/css/style.css">
|
||||
|
||||
<link rel="stylesheet" href="/public/fu/fu.css" type="text/css">
|
||||
|
||||
{block name="head"}{/block}
|
||||
{block name="head-css"}{/block}
|
||||
@@ -145,7 +145,8 @@
|
||||
<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/fu/fu.js?v={site:cfg code="STATIC_FILE_VERSION" encode="false"/}'></script>
|
||||
{// 全局统计 }
|
||||
{site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<link rel="stylesheet" href="/template/videonunu/css/stui_block.css" type="text/css">
|
||||
<link rel="stylesheet" href="/template/videonunu/css/stui_block_color.css" type="text/css">
|
||||
<link rel="stylesheet" href="/template/videonunu/css/stui_default.css" type="text/css">
|
||||
|
||||
<link rel="stylesheet" href="/public/fu/fu.css" type="text/css">
|
||||
|
||||
{block name="head"}{/block}
|
||||
{block name="head-css"}{/block}
|
||||
@@ -124,7 +124,8 @@
|
||||
|
||||
<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/fu/fu.js?v={site:cfg code="STATIC_FILE_VERSION" encode="false"/}'></script>
|
||||
{// 全局统计 }
|
||||
{site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/}
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
{if !empty($arrGrm[$key + [start]])}
|
||||
{$arrGrm[$key+[start]]|raw}
|
||||
{/if}
|
||||
<a class="stui-vodlist__thumb lazyload-bg"
|
||||
<a class="stui-vodlist__thumb "
|
||||
href='{site:vurl v_id="$Video.v_id" v_py="$Video.v_name_en"/}'
|
||||
title="{$Video.v_name ?? ''} - {$Video.v_parent_category ?? ''}{$Video.v_category ?? ''}免费高清电影在线观看"
|
||||
>
|
||||
<img class="lazyload-img" src="/static/img/load.png" data-src="{$Video.v_pic ?? ''}" style="display: none;"
|
||||
<img class="lazyload-img" src="/static/img/loading.webp" data-src="{$Video.v_pic ?? ''}"
|
||||
alt="{$Video.v_name ?? ''} - {$Video.v_parent_category ?? ''}{$Video.v_category ?? ''}免费高清电影在线观看">
|
||||
<span class="play hidden-xs"></span>
|
||||
<span class="pic-text text-right">{$Video.v_remarks}</span>
|
||||
|
||||
90
code/public/public/fu/fu.css
Normal file
90
code/public/public/fu/fu.css
Normal file
@@ -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);
|
||||
}
|
||||
108
code/public/public/fu/fu.js
Normal file
108
code/public/public/fu/fu.js
Normal file
@@ -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;
|
||||
@@ -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;}
|
||||
|
||||
Reference in New Issue
Block a user