This commit is contained in:
make
2025-05-02 12:04:24 +08:00
parent 7ec3ef4f38
commit 85f2ef5cb2
5 changed files with 389 additions and 24 deletions

View File

@@ -76,27 +76,6 @@ Route::get('/searchhome/0', function (\think\Request $Request, SiteContext $Site
})->ext('html');
/**
* 视频分类首页
*/
// Route::get('/vodtype/dianying', function (\think\Request $Request, SiteContext $SiteContext) {
// return view('video/getCategoryType.html');
// });
// Route::get('/vodtype/dianshiju', function (\think\Request $Request, SiteContext $SiteContext) {
// return view('video/getCategoryType.html');
// });
// Route::get('/vodtype/zonyi', function (\think\Request $Request, SiteContext $SiteContext) {
// return view('video/getCategoryType.html');
// });
// Route::get('/vodtype/donman', function (\think\Request $Request, SiteContext $SiteContext) {
// return view('video/getCategoryType.html');
// });
// Route::get('/vodtype/duanju', function (\think\Request $Request, SiteContext $SiteContext) {
// return view('video/getCategoryType.html');
// });
/**
* 路由配置文件
*/
@@ -112,7 +91,7 @@ $arrRoutes = [
// 视频站点url -- start
// 视频分类 首页
'video_category' => [
'video_category_index' => [
'/vodtype/:strCategory',
'/vodclass/:strCategory',
'/shipin-fenlei/:strCategory',
@@ -123,6 +102,19 @@ $arrRoutes = [
'/video-leixing/:strCategory',
],
// 视频分类 分页 /vodshow/dianying/dong-zuo-pian/中国大陆/国语/1992/news/page1
// /vodshow/电影/动作片/中国大陆/国语/1992/最新/第一页
// /vodshow/dianying/dong-zuo-pian/zhongguodalu/guoyu/1992/news/page1
'video_category' => [
'/vodshow/:strClass/:strCategory/:strArea/:strLang/:strYear/:strSort/page:intPage',
'/:strCategory/vodshow-:strClass-:strArea-:strLang-:strYear-:strSort-page:intPage',
'/vodshow-:strCategory/:strClass-:strArea-:strLang-:strYear-:strSort-page:intPage',
// '/vodshow/:strClass-:strCategory-:strArea-:strLang-:strYear-:strSort-page:intPage',
// /dong-zuo-pian/vodshow-dianying-zhongguodalu-guoyu-1992-news-page1
// /vodshow-dong-zuo-pian/dianying-zhongguodalu-guoyu-1992-news-page1
// /vodshow/dianying-dong-zuo-pian-zhongguodalu-guoyu-1992-news-page1
],
// 视频站点url -- end
@@ -332,12 +324,12 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
switch ($key) {
// 视频站点url -- start
case 'video_category':
case 'video_category_index':
$strView = 'pc/getCategoryType.html';
if ($platform == 'h5') {
$strView = 'video/getCategoryType.html';
}
//书库/分类
//视频分类 首页
Route::get($strRoute, function () use ($strView) {
return view($strView);
})
@@ -345,6 +337,30 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
'strCategory' => '[a-z\-]*', // 允许空值
]);
break;
case 'video_category':
$strView = 'pc/getCategory.html';
if ($platform == 'h5') {
$strView = 'video/getCategory.html';
}
//视频分类 分页
Route::get($strRoute, function () use ($strView) {
return view($strView);
})
->pattern([
'strClass' => '[a-z\-]*', // 允许空值
'strCategory' => '[a-z\-]*', // 允许空值
'strArea' => '[a-z\-]*', // 允许空值
'strLang' => '[a-z\-]*', // 允许空值
'strYear' => '[a-zA-Z0-9\-]*', // 允许空值
'strSort' => '[a-z\-]*', // 允许空值
'intPage' => '\d*', // 允许空值
// '/vodshow/:strClass/:strCategory/:strArea/:strLang/:strYear/:strSort/page:intPage'
// /vodshow/dianying/dong-zuo-pian/zhongguodalu/guoyu/1992/news/page1
// /dong-zuo-pian/vodshow-dianying-zhongguodalu-guoyu-1992-news-page1
]);
break;
// 视频站点url -- end
case 'latest':