This commit is contained in:
make
2025-05-02 00:37:28 +08:00
parent a905b5f73f
commit 7ec3ef4f38
14 changed files with 2235 additions and 6 deletions

View File

@@ -76,6 +76,27 @@ 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');
// });
/**
* 路由配置文件
*/
@@ -88,6 +109,25 @@ $arrRoutes = [
// 通用路径别名
'paths' => [
// 视频站点url -- start
// 视频分类 首页
'video_category' => [
'/vodtype/:strCategory',
'/vodclass/:strCategory',
'/shipin-fenlei/:strCategory',
'/shipin-leixing/:strCategory',
'/video-type/:strCategory',
'/video-class/:strCategory',
'/video-category/:strCategory',
'/video-leixing/:strCategory',
],
// 视频站点url -- end
// 章节相关路径
'chapter' => [
'/xiaoshuo/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]',
@@ -290,6 +330,23 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
foreach ($arrUrl as $strUrl) {
$strRoute = $strPath . $strUrl;
switch ($key) {
// 视频站点url -- start
case 'video_category':
$strView = 'pc/getCategoryType.html';
if ($platform == 'h5') {
$strView = 'video/getCategoryType.html';
}
//书库/分类
Route::get($strRoute, function () use ($strView) {
return view($strView);
})
->pattern([
'strCategory' => '[a-z\-]*', // 允许空值
]);
break;
// 视频站点url -- end
case 'latest':
//最新章节
$strView = 'pc/getNovelChapter.html';