debug
This commit is contained in:
@@ -13,6 +13,49 @@ Route::get('/article/fenlei/:category', function (\think\Request $Request, SiteC
|
||||
return view('test/test01/index.html');
|
||||
});
|
||||
|
||||
/**
|
||||
* Sitemap
|
||||
*/
|
||||
Route::get('/robots', function (\think\Request $Request, SiteContext $SiteContext) {
|
||||
return view('sitemap/robots.txt');
|
||||
})->ext('txt');
|
||||
|
||||
/**
|
||||
* Sitemap 索引文件
|
||||
*/
|
||||
Route::get('/sitemap_index', function (\think\Request $Request, SiteContext $SiteContext) {
|
||||
return view('sitemap/sitemap_index.xml');
|
||||
})->ext('xml');
|
||||
|
||||
/**
|
||||
* 首页、分类列表、排行榜、男生/女生频道。
|
||||
*/
|
||||
Route::get('/sitemap-main', function (\think\Request $Request, SiteContext $SiteContext) {
|
||||
return view('sitemap/sitemap-main.xml');
|
||||
})->ext('xml');
|
||||
|
||||
/**
|
||||
* 小说目录页面。
|
||||
*/
|
||||
Route::get('/sitemap-books-catalog-:page', function (\think\Request $Request, SiteContext $SiteContext) {
|
||||
return view('sitemap/sitemap-books-catalog.xml');
|
||||
})->ext('xml');
|
||||
|
||||
/**
|
||||
* 小说详情页面。
|
||||
*/
|
||||
Route::get('/sitemap-books-:page', function (\think\Request $Request, SiteContext $SiteContext) {
|
||||
return view('sitemap/sitemap-books.xml');
|
||||
})->ext('xml');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 章节页面(如果包含)
|
||||
*/
|
||||
Route::get('/sitemap-chapters-:page', function (\think\Request $Request, SiteContext $SiteContext) {
|
||||
return view('sitemap/sitemap-chapters.xml');
|
||||
})->ext('xml');
|
||||
|
||||
|
||||
/**
|
||||
@@ -59,12 +102,12 @@ $arrRoutes = [
|
||||
|
||||
// 伪小说详情相关路径
|
||||
'kan-novel' => [
|
||||
'/kan-xiaoshuo/:name-:intNovelId-:n_forge_id',
|
||||
'/show-novel/:name-:intNovelId-:n_forge_id',
|
||||
'/seo-book/:name-:intNovelId-:n_forge_id',
|
||||
'/show-xiaoshuo-:name-:intNovelId-:n_forge_id',
|
||||
'/see-novel-:name-:intNovelId-:n_forge_id',
|
||||
'/good-book-:name-:intNovelId-:n_forge_id',
|
||||
'/kan-xiaoshuo/:name-:intNovelId-:intForgeId',
|
||||
'/show-novel/:name-:intNovelId-:intForgeId',
|
||||
'/seo-book/:name-:intNovelId-:intForgeId',
|
||||
'/show-xiaoshuo-:name-:intNovelId-:intForgeId',
|
||||
'/see-novel-:name-:intNovelId-:intForgeId',
|
||||
'/good-book-:name-:intNovelId-:intForgeId',
|
||||
],
|
||||
|
||||
// 小说详情相关路径
|
||||
@@ -211,9 +254,9 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
|
||||
switch ($key) {
|
||||
case 'latest':
|
||||
//最新章节
|
||||
$strView = 'pc/getNovelCatalog.html';
|
||||
$strView = 'pc/getNovelChapter.html';
|
||||
if ($platform == 'h5') {
|
||||
$strView = 'novel/getNovelCatalog.html';
|
||||
$strView = 'novel/getNovelChapter.html';
|
||||
}
|
||||
Route::get($strRoute, function () use ($strView) {
|
||||
return view($strView);
|
||||
@@ -242,7 +285,7 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
|
||||
Route::get($strRoute, function () use ($strView) {
|
||||
return view($strView);
|
||||
})
|
||||
->pattern(['intNovelId' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
|
||||
->pattern(['intNovelId' => '\d+', 'intForgeId' => '\d+', 'name' => '[\w-]+',]);
|
||||
break;
|
||||
|
||||
case 'novel':
|
||||
@@ -284,7 +327,7 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
|
||||
'strStatus' => '(all|lianzai|wanjie)?', // 允许空值
|
||||
'strOrder' => '[a-z\-]*', // 允许空值
|
||||
'intPage' => '\d*', // 允许空值
|
||||
// 'strCategory' => 'all|xuanhuan-xiuzhen|junshi-xiaoshuo|wangyou-xiaoshuo|kehuan-xiaoshuo|zhongsheng-chuanyue|dushi-xiaoshuo|lingyi-xiaoshuo|yanqing-xiaoshuo|qita-xiaoshuo',
|
||||
// 'strCategory' => 'all|xuanhuan-xiuzhen|junshi-xiaoshuo|wangyou-xiaoshuo|kehuan-xiaoshuo|hongsheng-chuanyue|dushi-xiaoshuo|lingyi-xiaoshuo|yanqing-xiaoshuo|qita-xiaoshuo',
|
||||
|
||||
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user