@@ -172,6 +172,7 @@ export_name="arrVideoPiaofang" /}
{video:categorytype category_type="ONE" d_key="intParentKey" d_val="val"}
+
{include file="public/video-panel" /}
{/video:categorytype}
diff --git a/code/public/public/fu/env.back.js b/code/public/public/fu/env.back.js
index 504acad..1d33f5b 100644
--- a/code/public/public/fu/env.back.js
+++ b/code/public/public/fu/env.back.js
@@ -8,12 +8,29 @@ const popupDataAll = [
template: 'videoDadi',
},
];
+
//data
const popupData = [
{
- image: 'https://www.test.com/img/video/2025/05/24/13/rou-pu-tuan-zhi-ji-le-bao-jian.webp',
- title: '3D肉蒲团之极乐宝鉴',// 3d
- link: 'https://test.com/vod/rou-pu-tuan-zhi-ji-le-bao-jian-106422',
+ image: '/static/img/s-a.png',
+ title: '111;',// 3d
+ link: 'https://test.shop',
+ template: 'videoNuNu',
+ },
+];
+const bannerData = [
+ {
+ image: '/static/img/b-a.png',
+ title: '111;',// 3d
+ link: 'https://test.shop',
+ template: 'videoNuNu',
+ },
+];
+const topData = [
+ {
+ image: '/static/img/top-a.png',
+ title: '111;',// 3d
+ link: 'https://test.shop',
template: 'videoNuNu',
},
];
diff --git a/code/public/public/fu/fu.js b/code/public/public/fu/fu.js
index 7131a56..c16e5ec 100644
--- a/code/public/public/fu/fu.js
+++ b/code/public/public/fu/fu.js
@@ -223,6 +223,12 @@ const strCsHtmlTop = `
{{title}}
`
+
+const strCsHtmlBanner = `
+
+
+
+ `
function replaceList() {
strCsHtml = '';
switch (strTemplate) {
@@ -263,7 +269,7 @@ function replaceList() {
let items = list.querySelectorAll('li');
if (items.length > 0) {
let randomIndex = Math.floor(Math.random() * items.length);
- let oldItem = items[randomIndex];
+ let oldItem = items[0];
let oldClass = oldItem.className;
// 创建新元素容器
@@ -284,11 +290,43 @@ function replaceList() {
// top
const firstItem = document.querySelector('.movie-tuijian-list > .movei-tuijian-item');
- if (firstItem && popupData.length > 0) {
- const randomIndex = Math.floor(Math.random() * popupData.length);
- const CsData = popupData[randomIndex]
- firstItem.href = CsData.link;
+ if (firstItem && topData.length > 0) {
+ const randomIndex = Math.floor(Math.random() * topData.length);
+ const CsData = topData[randomIndex];
+ // 1)修改 a 标签链接
+ firstItem.href = CsData.link;
+ // 2)修改封面图(video-cover)
+ const coverImg = firstItem.querySelector('.video-cover');
+ if (coverImg) {
+ if (CsData.image) {
+ coverImg.dataset.src = CsData.image; // lazyload 地址
+ coverImg.src = CsData.image; // 确保立即显示
+ }
+ }
+ // 3)修改标题
+ const titleEl = firstItem.querySelector('h3');
+ if (titleEl && CsData.title) {
+ titleEl.textContent = CsData.title;
+ }
}
+
+
+ // banner
+ let listbs = document.querySelectorAll('.cs-list-b');
+ listbs.forEach(item => {
+ const randomIndex = Math.floor(Math.random() * bannerData.length);
+ const CsData = bannerData[randomIndex]
+
+ // 替换模板中的占位符
+ const renderedTemplate = strCsHtmlBanner
+ .replace(/{{image}}/g, CsData.image)
+ .replace(/{{title}}/g, escapeHtml(decodeHtmlEntities(CsData.title))) // 防止XSS
+ .replace(/{{link}}/g, escapeHtml(CsData.link));
+
+ item.innerHTML = renderedTemplate.trim();
+
+
+ });
}
function shouldTrigger(probability = 0.5) {
diff --git a/code/public/static/img/b-a.png b/code/public/static/img/b-a.png
new file mode 100644
index 0000000..4b4d263
Binary files /dev/null and b/code/public/static/img/b-a.png differ
diff --git a/code/public/static/img/s-a.png b/code/public/static/img/s-a.png
new file mode 100644
index 0000000..944972b
Binary files /dev/null and b/code/public/static/img/s-a.png differ
diff --git a/code/public/static/img/top-a.png b/code/public/static/img/top-a.png
new file mode 100644
index 0000000..d58782a
Binary files /dev/null and b/code/public/static/img/top-a.png differ