diff --git a/code/app/home/config/router.php b/code/app/home/config/router.php index 19b78eb..4b16323 100644 --- a/code/app/home/config/router.php +++ b/code/app/home/config/router.php @@ -384,9 +384,9 @@ $arrRoutes = [ '/:strParentCategory-:strSortType/:strCategory-phb', ], - + //搜索 - 'video_search' => ['/search', '/explore', '/sousuo', '/find', '/query', '/keywords'], + 'video_search' => ['/search', '/explore', '/sousuo', '/find', '/query', '/keywords', '/get', '/key', '/s'], // 历史记录 'video_history' => ['/history', '/reading-history', '/seed-record', '/lishi', '/kan-lishi', '/browse-past', '/jilu', '/zuji', '/seed'], diff --git a/code/app/home/view/default/baseH5.html b/code/app/home/view/default/baseH5.html index 98c9c16..87c51d2 100644 --- a/code/app/home/view/default/baseH5.html +++ b/code/app/home/view/default/baseH5.html @@ -21,6 +21,20 @@ + diff --git a/code/app/home/view/default/basePc.html b/code/app/home/view/default/basePc.html index 57607ff..85a03e4 100644 --- a/code/app/home/view/default/basePc.html +++ b/code/app/home/view/default/basePc.html @@ -28,6 +28,20 @@ + {block name="strPageCode"} diff --git a/code/app/home/view/haoZi/baseH5.html b/code/app/home/view/haoZi/baseH5.html index b729099..35fd5b6 100644 --- a/code/app/home/view/haoZi/baseH5.html +++ b/code/app/home/view/haoZi/baseH5.html @@ -26,6 +26,20 @@ + diff --git a/code/app/home/view/haoZi/basePc.html b/code/app/home/view/haoZi/basePc.html index ac0fbbd..5e81a65 100644 --- a/code/app/home/view/haoZi/basePc.html +++ b/code/app/home/view/haoZi/basePc.html @@ -20,6 +20,20 @@ + diff --git a/code/app/home/view/kuangYu/baseH5.html b/code/app/home/view/kuangYu/baseH5.html index 125bb52..4496ed4 100644 --- a/code/app/home/view/kuangYu/baseH5.html +++ b/code/app/home/view/kuangYu/baseH5.html @@ -26,6 +26,20 @@ + diff --git a/code/app/home/view/kuangYu/basePc.html b/code/app/home/view/kuangYu/basePc.html index 039e737..1b5e5d9 100644 --- a/code/app/home/view/kuangYu/basePc.html +++ b/code/app/home/view/kuangYu/basePc.html @@ -19,6 +19,20 @@ + diff --git a/code/app/home/view/shikong/baseH5.html b/code/app/home/view/shikong/baseH5.html index 93b9c89..f18534b 100644 --- a/code/app/home/view/shikong/baseH5.html +++ b/code/app/home/view/shikong/baseH5.html @@ -37,6 +37,21 @@ {block name="head"}{/block} + + diff --git a/code/app/home/view/shikong/basePc.html b/code/app/home/view/shikong/basePc.html index c045839..21167df 100644 --- a/code/app/home/view/shikong/basePc.html +++ b/code/app/home/view/shikong/basePc.html @@ -28,6 +28,20 @@ + diff --git a/code/app/home/view/shikong/public/footer.html b/code/app/home/view/shikong/public/footer.html index ace4399..0292dfc 100644 --- a/code/app/home/view/shikong/public/footer.html +++ b/code/app/home/view/shikong/public/footer.html @@ -1,33 +1,32 @@ - - - + + \ No newline at end of file diff --git a/code/app/home/view/videoBoKu/base.html b/code/app/home/view/videoBoKu/base.html index df52fe4..f849f54 100644 --- a/code/app/home/view/videoBoKu/base.html +++ b/code/app/home/view/videoBoKu/base.html @@ -31,175 +31,6 @@ - - - -{block name="strPageCode"} - -{/block} - - -
-
-
-
- - - - -
    -
  • - - -
  • - - -
-
-
-
-
- - {block name="main"} - {/block} - - - {include file="public/footer" /} - - {block name="customize"}{/block} - - - - - {block name="footer-js"}{/block} - - - - - {// 全局统计 } - {site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/} - - {// 站点统计 } - {$DomainModel->d_statis|raw} - - - + + +{block name="strPageCode"} + +{/block} + + +
+
+
+
+ + + + +
    +
  • + + +
  • + + +
+
+
+
+
+ + {block name="main"} + {/block} + + + {include file="public/footer" /} + + {block name="customize"}{/block} + + + {block name="footer-js"}{/block} + + + + + {// 全局统计 } + {site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/} + + {// 站点统计 } + {$DomainModel->d_statis|raw} + + + + + + {/block} diff --git a/code/app/home/view/videoDadi/base.html b/code/app/home/view/videoDadi/base.html index d90bddd..e182c41 100644 --- a/code/app/home/view/videoDadi/base.html +++ b/code/app/home/view/videoDadi/base.html @@ -26,10 +26,25 @@ const strPcPath = `{$strPcPath}`; + + {block name="strPageCode"} - + {/block} @@ -65,12 +80,12 @@ + + + - - - - - + + + + + + + +
- + {block name="main"} {/block} @@ -187,7 +204,7 @@ {include file="public/footer" /} {block name="customize"}{/block} - + @@ -196,30 +213,17 @@ {block name="footer-js"}{/block} + src='/public/video/common.js?v={site:cfg code="STATIC_FILE_VERSION" encode="false"/}'> {// 全局统计 } {site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/} {// 站点统计 } {$DomainModel->d_statis|raw} - - - - + + + + \ No newline at end of file diff --git a/code/app/home/view/videoDingZhu/video/getVideoPlayUrl.html b/code/app/home/view/videoDingZhu/video/getVideoPlayUrl.html index c5e4969..09590a4 100644 --- a/code/app/home/view/videoDingZhu/video/getVideoPlayUrl.html +++ b/code/app/home/view/videoDingZhu/video/getVideoPlayUrl.html @@ -424,6 +424,7 @@ var intJumpTimeTwoEnd = 1; var arrPlayUrl = {$arrVideo.v_play_url | json_encode | raw}; var strPlayUrl = "" + {/block} diff --git a/code/app/home/view/videoFengNiao/base.html b/code/app/home/view/videoFengNiao/base.html index 82e042d..9d04b39 100644 --- a/code/app/home/view/videoFengNiao/base.html +++ b/code/app/home/view/videoFengNiao/base.html @@ -14,14 +14,30 @@ - - + + {block name="head"}{/block} {block name="head-css"}{/block} {block name="head-js"}{/block} + + @@ -42,12 +58,12 @@ {$val.v_category} - {/video:categorytype} + {/video:categorytype}
  • 排行榜 - +
  • @@ -79,12 +95,12 @@ {$val.v_category} - {/video:categorytype} + {/video:categorytype}
  • 排行榜 - +
  • @@ -115,20 +131,7 @@ {$DomainModel->d_statis|raw} - + diff --git a/code/app/home/view/videoFengNiao/public/video-list-shu-pf.html b/code/app/home/view/videoFengNiao/public/video-list-shu-pf.html index c69ec1b..8d4a3c9 100644 --- a/code/app/home/view/videoFengNiao/public/video-list-shu-pf.html +++ b/code/app/home/view/videoFengNiao/public/video-list-shu-pf.html @@ -7,8 +7,7 @@ + > {$Video.v_name ?? ''} - {$Video.v_parent_category ?? ''}{$Video.v_category ?? ''}免费高清电影在线观看 diff --git a/code/app/home/view/videoLaoNiu/base.html b/code/app/home/view/videoLaoNiu/base.html index 832abaa..56cd698 100644 --- a/code/app/home/view/videoLaoNiu/base.html +++ b/code/app/home/view/videoLaoNiu/base.html @@ -16,14 +16,7 @@ - + {block name="head"}{/block} {block name="head-css"}{/block} @@ -31,10 +24,25 @@ + + {block name="strPageCode"} - + {/block} @@ -55,7 +63,7 @@ - {else} @@ -65,13 +73,15 @@ {/if} {video:categorytype category_type="ONE" d_key="key" d_val="val"} - - {/video:categorytype} - - + {block name="main"} {site:wz wz="主内容" /}{/block} @@ -75,7 +93,7 @@ - + diff --git a/code/app/home/view/xiongMao/basePc.html b/code/app/home/view/xiongMao/basePc.html index ed7b902..212d46a 100644 --- a/code/app/home/view/xiongMao/basePc.html +++ b/code/app/home/view/xiongMao/basePc.html @@ -19,6 +19,20 @@ + diff --git a/code/public/public/video/common.js b/code/public/public/video/common.js index f4cedcb..e991662 100644 --- a/code/public/public/video/common.js +++ b/code/public/public/video/common.js @@ -58,17 +58,18 @@ function isMobile() { // 懒加载 document.addEventListener("DOMContentLoaded", function () { - // 通用懒加载函数 function lazyLoad(elements, callback) { const observer = new IntersectionObserver((entries, observer) => { entries.forEach(entry => { if (entry.isIntersecting) { const element = entry.target; - callback(element); // 执行懒加载逻辑 - observer.unobserve(element); // 停止观察 + callback(element); + observer.unobserve(element); } }); + }, { + rootMargin: '100px' // 提前 100px 开始加载 }); elements.forEach(element => observer.observe(element)); @@ -79,8 +80,16 @@ document.addEventListener("DOMContentLoaded", function () { lazyLoad(lazyBackgrounds, (element) => { const src = element.getAttribute("data-src"); if (src) { - element.style.backgroundImage = `url(${src})`; - element.classList.remove("lazyload-bg"); + const img = new Image(); + img.src = src; + img.onload = () => { + element.style.backgroundImage = `url(${src})`; + element.classList.remove("lazyload-bg"); + }; + img.onerror = () => { + // console.error(`Failed to load background image: ${src}`); + // 可选:设置默认背景或错误提示 + }; } }); @@ -89,8 +98,16 @@ document.addEventListener("DOMContentLoaded", function () { lazyLoad(lazyImages, (element) => { const src = element.getAttribute("data-src"); if (src) { - element.setAttribute("src", src); - element.classList.remove("lazyload-img"); + const img = new Image(); + img.src = src; + img.onload = () => { + element.setAttribute("src", src); + element.classList.remove("lazyload-img"); + }; + img.onerror = () => { + // console.error(`Failed to load image: ${src}`); + // 可选:设置占位图或错误提示 + }; } }); }); @@ -465,9 +482,16 @@ function initDPlayer(strPlayUrl) { // 监听当前播放时间 videoPlayer.on('timeupdate', function () { if (strPlayType == 'default' || strPlayType == 'youzhi') { - if (videoPlayer.video.currentTime >= 476 && videoPlayer.video.currentTime < 494) { //18秒 - videoPlayer.seek(495); // 跳过到 494 秒 + // 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 秒 @@ -480,8 +504,41 @@ function initDPlayer(strPlayUrl) { 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 秒 + // } } + }); } @@ -543,9 +600,11 @@ document.addEventListener("DOMContentLoaded", function () { if (typeof strPlayType !== "undefined"){ if (strPlayType == 'default') { strPlayUrl = findFirstUrl(arrPlayUrl) + // checkLine(strPlayType); } else { var ActivePlayUrl = arrPlayUrl[strPlayType][intPlayUrlIndex - 1] strPlayUrl = ActivePlayUrl.url + checkLine(strPlayType); } initDPlayer(strPlayUrl) } diff --git a/code/public/static/img/loading.webp b/code/public/static/img/loading.webp new file mode 100644 index 0000000..c2f792f Binary files /dev/null and b/code/public/static/img/loading.webp differ diff --git a/code/public/static/img/loading3.gif b/code/public/static/img/loading3.gif new file mode 100644 index 0000000..70d09e1 Binary files /dev/null and b/code/public/static/img/loading3.gif differ diff --git a/code/public/static/img/loading4.gif b/code/public/static/img/loading4.gif new file mode 100644 index 0000000..c21fbcc Binary files /dev/null and b/code/public/static/img/loading4.gif differ