This commit is contained in:
make
2025-05-27 21:24:45 +08:00
parent ef3eb4b1b4
commit 9c2d7e54c5
10 changed files with 200 additions and 29 deletions

View File

@@ -499,13 +499,25 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
case 'video_search':
//搜素
$strView = 'pc/getSearchVideo.html';
// $strView = 'pc/getSearchVideo.html';
// if ($platform == 'h5') {
// $strView = 'video/getSearchVideo.html';
// }
// Route::get($strRoute, function () use ($strView) {
// return view($strView);
// })->ext('html');
// break;
// 首页
if ($platform == 'h5') {
$strView = 'video/getSearchVideo.html';
Route::get($strRoute, function (\think\Request $Request, SiteContext $SiteContext) {
return view($SiteContext->getHomeView('h5'));
});
} else {
Route::get($strRoute, function (\think\Request $Request, SiteContext $SiteContext) {
return view($SiteContext->getHomeView('pc'));
});
}
Route::get($strRoute, function () use ($strView) {
return view($strView);
})->ext('html');
break;
case 'video_history':
@@ -668,13 +680,25 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
case 'search':
//搜素
$strView = 'pc/getSearchNovel.html';
// $strView = 'pc/getSearchNovel.html';
// if ($platform == 'h5') {
// $strView = 'novel/getSearchNovel.html';
// }
// Route::get($strRoute, function () use ($strView) {
// return view($strView);
// })->ext('html');
// break;
// 首页
if ($platform == 'h5') {
$strView = 'novel/getSearchNovel.html';
Route::get($strRoute, function (\think\Request $Request, SiteContext $SiteContext) {
return view($SiteContext->getHomeView('h5'));
});
} else {
Route::get($strRoute, function (\think\Request $Request, SiteContext $SiteContext) {
return view($SiteContext->getHomeView('pc'));
});
}
Route::get($strRoute, function () use ($strView) {
return view($strView);
})->ext('html');
break;
case 'user':