diff --git a/code/app/home/config/router.php b/code/app/home/config/router.php index 4323084..fb78f48 100644 --- a/code/app/home/config/router.php +++ b/code/app/home/config/router.php @@ -149,38 +149,57 @@ $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', ], //排行榜 - 'video_rank_index' => ['/paihang/index', '/rank/index', '/paihang-quan', '/top/index', '/paihang-bang', '/ranks/index', '/sort/index', '/order/index', '/total/index'], + 'video_rank_index' => ['/paihang/index', '/rank/index', '/paihang-quan', '/top/index', '/paihang-bang', '/ranks/index', '/sort/index', '/order/index', '/phb/index'], + + //排行榜 + 'video_rank_list' => [ + '/paihang/:strClass/:strCategory/:strSortType', + '/rank:strCategory/:strClass-:strSortType', + '/:strClass/:strCategory/:strSortType-paihang', + + '/:strCategory/:strClass-:strSortType-top', + '/:strClass-:strSortType/paihangbang-:strCategory', + '/:strClass-:strSortType/:strCategory-ranks', + + '/sort:strCategory/:strClass-:strSortType', + '/:strClass/:strCategory/:strSortType-order', + '/:strClass-:strSortType/:strCategory-phb', + + ], + + //搜索 + 'video_search' => ['/search', '/explore', '/sousuo', '/find', '/query', '/keywords'], // 视频站点url -- end @@ -404,7 +423,38 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) { 'strClass' => '[a-z\-]*', // 允许空值 ]); break; - + + case 'video_rank_index': + $strView = 'pc/getRank.html'; + if ($platform == 'h5') { + $strView = 'video/getRank.html'; + } + //视频排行榜 首页 + Route::get($strRoute, function () use ($strView) { + return view($strView); + }) + ->pattern([ + + ]); + break; + + case 'video_rank_list': + $strView = 'pc/getRankList.html'; + if ($platform == 'h5') { + $strView = 'video/getRankList.html'; + } + //视频分类 分页 + Route::get($strRoute, function () use ($strView) { + return view($strView); + }) + ->pattern([ + 'strClass' => '[a-z\-]*', // 允许空值 + 'strCategory' => '[a-z\-]*', // 允许空值 + 'strSortType' => '[a-z\-]*', // 允许空值 + 'intPage' => '\d*', // 允许空值 + ]); + break; + case 'video_category': $strView = 'pc/getCategory.html'; if ($platform == 'h5') { @@ -433,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': @@ -445,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 7edd6a5..2763160 100644 --- a/code/app/home/view/videoDadi/base.html +++ b/code/app/home/view/videoDadi/base.html @@ -69,11 +69,11 @@ - +