From 483c46b6d2bf42115c2a677ddc5e27089abda779 Mon Sep 17 00:00:00 2001 From: make Date: Sat, 3 May 2025 17:48:13 +0800 Subject: [PATCH] debug --- code/app/home/config/router.php | 56 ++++--- code/app/home/view/videoDadi/base.html | 10 +- code/app/home/view/videoDadi/index/index.html | 9 +- .../view/videoDadi/public/video-list-phb.html | 4 +- .../videoDadi/public/video-list-phb2.html | 7 +- .../public/video-list-shu-end-text.html | 4 +- .../public/video-list-shu-top-text.html | 4 +- .../view/videoDadi/public/video-list-shu.html | 6 +- .../videoDadi/public/video-list-text.html | 2 +- .../videoDadi/public/video-list-text2.html | 2 +- .../view/videoDadi/video/getSearchVideo.html | 153 ++++++++++++++++++ .../view/videoDadi/video/getVideoInfo.html | 56 +++---- .../view/videoDadi/video/getVideoPlayUrl.html | 36 +++-- code/app/services/SiteContext.php | 2 + code/app/services/VideoService.php | 28 +++- code/extend/template/taglib/Site.php | 80 ++++++++- code/extend/template/taglib/Video.php | 2 +- .../initdata/video/baseSubjectFomartGroup.php | 4 +- .../initdata/video/urlSubjectFomartGroup.php | 32 ++-- .../template/videodadi/css/stui_block.css | 4 +- .../public/template/videodadi/img/favicon.ico | Bin 0 -> 291 bytes code/public/template/videodadi/img/play.png | Bin 0 -> 2457 bytes doc/TemplateTag.md | 8 + 23 files changed, 399 insertions(+), 110 deletions(-) create mode 100644 code/app/home/view/videoDadi/video/getSearchVideo.html create mode 100644 code/public/template/videodadi/img/favicon.ico create mode 100644 code/public/template/videodadi/img/play.png diff --git a/code/app/home/config/router.php b/code/app/home/config/router.php index e4a9532..fb78f48 100644 --- a/code/app/home/config/router.php +++ b/code/app/home/config/router.php @@ -149,33 +149,33 @@ $arrRoutes = [ * /voddetail/strVideoPinyin-1 */ 'video_info' => [ - '/voddetail/:strVideoPinyin-:intVideoId', - '/vodinfo/:strVideoPinyin-:intVideoId', - '/vod/:strVideoPinyin-:intVideoId', + '/voddetail/:strPinyin-:intVId', + '/vodinfo/:strPinyin-:intVId', + '/vod/:strPinyin-:intVId', - '/video-info/:strVideoPinyin-:intVideoId', - '/video-detail/:strVideoPinyin-:intVideoId', - '/video/:strVideoPinyin-:intVideoId', + '/video-info/:strPinyin-:intVId', + '/video-detail/:strPinyin-:intVId', + '/video/:strPinyin-:intVId', - '/shipin/:strVideoPinyin-:intVideoId', - '/shipin-xiangqing/:strVideoPinyin-:intVideoId', - '/shipin-neiron/:strVideoPinyin-:intVideoId', + '/shipin/:strPinyin-:intVId', + '/shipin-xiangqing/:strPinyin-:intVId', + '/shipin-neiron/:strPinyin-:intVId', ], - // 视频播放 /vodplay/strVideoPinyin-10-wuxian-1 + // 视频播放 /vodplay/strPinyin-10-wuxian-1 'video_play' => [ - '/vodplay/:strVideoPinyin-:intVideoId-:strPlayType-:intPlayIndex', - '/vodbf/:strVideoPinyin-:intVideoId-:strPlayType-:intPlayIndex', - '/vodseed/:strVideoPinyin-:intVideoId-:strPlayType-:intPlayIndex', + '/vodplay/:strPinyin-:intVId-:strPlayType-:intPlayIndex', + '/vodbf/:strPinyin-:intVId-:strPlayType-:intPlayIndex', + '/vodseed/:strPinyin-:intVId-:strPlayType-:intPlayIndex', - '/video-play/:strVideoPinyin-:intVideoId-:strPlayType-:intPlayIndex', - '/video-bofang/:strVideoPinyin-:intVideoId-:strPlayType-:intPlayIndex', - '/video-show/:strVideoPinyin-:intVideoId-:strPlayType-:intPlayIndex', + '/video-play/:strPinyin-:intVId-:strPlayType-:intPlayIndex', + '/video-bofang/:strPinyin-:intVId-:strPlayType-:intPlayIndex', + '/video-show/:strPinyin-:intVId-:strPlayType-:intPlayIndex', - '/shipin-play/:strVideoPinyin-:intVideoId-:strPlayType-:intPlayIndex', - '/shipin-bofang/:strVideoPinyin-:intVideoId-:strPlayType-:intPlayIndex', - '/shipin-kan/:strVideoPinyin-:intVideoId-:strPlayType-:intPlayIndex', + '/shipin-play/:strPinyin-:intVId-:strPlayType-:intPlayIndex', + '/shipin-bofang/:strPinyin-:intVId-:strPlayType-:intPlayIndex', + '/shipin-kan/:strPinyin-:intVId-:strPlayType-:intPlayIndex', ], @@ -198,6 +198,9 @@ $arrRoutes = [ ], + //搜索 + 'video_search' => ['/search', '/explore', '/sousuo', '/find', '/query', '/keywords'], + // 视频站点url -- end @@ -480,7 +483,7 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) { Route::get($strRoute, function () use ($strView) { return view($strView); }) - ->pattern(['intVideoId' => '\d+', 'strVideoPinyin' => '[\w-]+',]); + ->pattern(['intVId' => '\d+', 'strPinyin' => '[\w-]+',]); break; case 'video_play': @@ -492,10 +495,21 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) { Route::get($strRoute, function () use ($strView) { return view($strView); }) - ->pattern(['intVideoId' => '\d+', 'intPlayIndex' => '\d+', 'strPlayType' => '[\w-]+','strVideoPinyin' => '[\w-]+',]); + ->pattern(['intVId' => '\d+', 'intPlayIndex' => '\d+', 'strPlayType' => '[\w-]+','strPinyin' => '[\w-]+',]); break; + case 'video_search': + //搜素 + $strView = 'pc/getSearchVideo.html'; + if ($platform == 'h5') { + $strView = 'video/getSearchVideo.html'; + } + Route::get($strRoute, function () use ($strView) { + return view($strView); + })->ext('html'); + break; + // 视频站点url -- end diff --git a/code/app/home/view/videoDadi/base.html b/code/app/home/view/videoDadi/base.html index 465d548..2763160 100644 --- a/code/app/home/view/videoDadi/base.html +++ b/code/app/home/view/videoDadi/base.html @@ -69,11 +69,11 @@ - + @@ -83,14 +82,14 @@ - 立即播放 + + 立即播放 + - {foreach $arrVideo.v_play_url as $key=>$arrPlayUrlType } + {foreach $arrVideo.v_play_url as $strPlayGroupName=>$arrPlayUrlType }
@@ -143,15 +145,15 @@
无需安装任何插件

- {$key} + {$strPlayGroupName}

@@ -174,7 +176,7 @@

{$arrVideo.v_name}

{$arrVideo.v_description} - {$arrVideo.v_name}   + {$arrVideo.v_name}  

@@ -197,8 +199,8 @@