This commit is contained in:
make
2025-04-12 22:45:39 +08:00
parent 23b082e3c1
commit f740eed79f
14 changed files with 310 additions and 835 deletions

View File

@@ -1,692 +0,0 @@
<?php
declare(strict_types=1);
use app\home\controller\Index;
use app\home\controller\Novel;
use app\home\controller\User;
use think\facade\Route;
/**
* 首页 - h5
*/
Route::get("/", [Index::class, 'index'])->ext('html')->append(['boolIsMobile' => true]);
/**
* 首页 - pc
*/
Route::get("/pc/", [Index::class, 'getPcIndex'])->append(['boolIsMobile' => false]);
Route::get("/web/", [Index::class, 'getPcIndex'])->append(['boolIsMobile' => false]);
Route::get("/desktop/", [Index::class, 'getPcIndex'])->append(['boolIsMobile' => false]);
Route::get("/index/", [Index::class, 'getPcIndex'])->append(['boolIsMobile' => false]);
Route::get("/shouye/", [Index::class, 'getPcIndex'])->append(['boolIsMobile' => false]);
/**
* 排行榜 - h5
*/
Route::get('/paihang/all', [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => true]);
Route::get('/rank/all', [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => true]);
Route::get('/paihang-quan', [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => true]);
Route::get('/top/all', [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => true]);
Route::get('/paihang-bang', [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => true]);
Route::get('/ranks/all', [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => true]);
/**
* 排行榜 - pc
*/
Route::get("/pc/paihang/all", [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => false]);
Route::get("/pc/rank/all", [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => false]);
Route::get("/pc/paihang-quan", [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => false]);
Route::get("/pc/top/all", [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => false]);
Route::get("/pc/paihang-bang", [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => false]);
Route::get("/pc/ranks/all", [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => false]);
/**
* 男生 - h5
*/
Route::get('/nansheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'boys']);
Route::get('/boys-novel', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'boys']);
Route::get('/nansheng-shu', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'boys']);
Route::get('/man-read', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'boys']);
Route::get('/nansheng-book', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'boys']);
Route::get('/male-novels', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'boys']);
/**
* 男生 - pc
*/
Route::get('/pc/nansheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'boys']);
Route::get('/pc/boys-novel', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'boys']);
Route::get('/pc/nansheng-shu', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'boys']);
Route::get('/pc/man-read', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'boys']);
Route::get('/pc/nansheng-book', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'boys']);
Route::get('/pc/male-novels', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'boys']);
/**
* 女生 - h5
*/
Route::get('/nvsheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'girls']);
Route::get('/girls-novel', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'girls']);
Route::get('/nvsheng-shu', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'girls']);
Route::get('/woman-read', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'girls']);
Route::get('/nvsheng-book', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'girls']);
Route::get('/female-novels', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'girls']);
/**
* 女生 - pc
*/
Route::get('/pc/nvsheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'girls']);
Route::get('/pc/girls-novel', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'girls']);
Route::get('/pc/nvsheng-shu', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'girls']);
Route::get('/pc/woman-read', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'girls']);
Route::get('/pc/nvsheng-book', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'girls']);
Route::get('/pc/female-novels', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'girls']);
/**
* 书库 h5
*/
Route::get('/shuku/:strGender/:strCategory/:strStatus/page:intPage', [Novel::class, 'getLibrary'])
->pattern([
'strGender' => 'nansheng-xiaoshuo|nvsheng-xiaoshuo|all',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
'intPage' => '\d+'
])
->append(['boolIsMobile' => true]);
Route::get('/books/:strGender/:strCategory/:strStatus/page:intPage', [Novel::class, 'getLibrary'])
->pattern([
'strGender' => 'nansheng-xiaoshuo|nvsheng-xiaoshuo|all',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
'intPage' => '\d+'
])
->append(['boolIsMobile' => true]);
Route::get('/library/:strGender/:strCategory/:strStatus/page:intPage', [Novel::class, 'getLibrary'])
->pattern([
'strGender' => 'nansheng-xiaoshuo|nvsheng-xiaoshuo|all',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
'intPage' => '\d+'
])
->append(['boolIsMobile' => true]);
Route::get('/fenlei/:strGender/:strCategory/:strStatus/page:intPage', [Novel::class, 'getLibrary'])
->pattern([
'strGender' => 'nansheng-xiaoshuo|nvsheng-xiaoshuo|all',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
'intPage' => '\d+'
])
->append(['boolIsMobile' => true]);
Route::get('/class/:strGender/:strCategory/:strStatus/page:intPage', [Novel::class, 'getLibrary'])
->pattern([
'strGender' => 'nansheng-xiaoshuo|nvsheng-xiaoshuo|all',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
'intPage' => '\d+'
])
->append(['boolIsMobile' => true]);
Route::get('/category/:strGender/:strCategory/:strStatus/page:intPage', [Novel::class, 'getLibrary'])
->pattern([
'strGender' => 'nansheng-xiaoshuo|nvsheng-xiaoshuo|all',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
'intPage' => '\d+'
])
->append(['boolIsMobile' => true]);
/**
* 书库 - pc
*/
Route::get('/pc/shuku/:strGender/:strCategory/:strStatus/page:intPage', [Novel::class, 'getLibrary'])
->pattern([
'strGender' => 'nansheng-xiaoshuo|nvsheng-xiaoshuo|all',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
'intPage' => '\d+'
])
->append(['boolIsMobile' => false]);
Route::get('/pc/books/:strGender/:strCategory/:strStatus/page:intPage', [Novel::class, 'getLibrary'])
->pattern([
'strGender' => 'nansheng-xiaoshuo|nvsheng-xiaoshuo|all',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
'intPage' => '\d+'
])
->append(['boolIsMobile' => false]);
Route::get('/pc/library/:strGender/:strCategory/:strStatus/page:intPage', [Novel::class, 'getLibrary'])
->pattern([
'strGender' => 'nansheng-xiaoshuo|nvsheng-xiaoshuo|all',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
'intPage' => '\d+'
])
->append(['boolIsMobile' => false]);
Route::get('/pc/fenlei/:strGender/:strCategory/:strStatus/page:intPage', [Novel::class, 'getLibrary'])
->pattern([
'strGender' => 'nansheng-xiaoshuo|nvsheng-xiaoshuo|all',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
'intPage' => '\d+'
])
->append(['boolIsMobile' => false]);
Route::get('/pc/class/:strGender/:strCategory/:strStatus/page:intPage', [Novel::class, 'getLibrary'])
->pattern([
'strGender' => 'nansheng-xiaoshuo|nvsheng-xiaoshuo|all',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
'intPage' => '\d+'
])
->append(['boolIsMobile' => false]);
Route::get('/pc/category/:strGender/:strCategory/:strStatus/page:intPage', [Novel::class, 'getLibrary'])
->pattern([
'strGender' => 'nansheng-xiaoshuo|nvsheng-xiaoshuo|all',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
'intPage' => '\d+'
])
->append(['boolIsMobile' => false]);
/**
* 书库首页-h5
*/
Route::get('/shuku/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => true]);
Route::get('/books/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => true]);
Route::get('/library/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => true]);
Route::get('/fenlei/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => true]);
Route::get('/class/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => true]);
Route::get('/category/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => true]);
/**
* 书库首页-pc
*/
Route::get('/pc/shuku/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => false]);
Route::get('/pc/books/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => false]);
Route::get('/pc/library/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => false]);
Route::get('/pc/fenlei/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => false]);
Route::get('/pc/class/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => false]);
Route::get('/pc/category/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => false]);
/**
* 小说章节 - h5
* /xiaoshuo/小说拼音-小说id/zhang-章节排序/章节分页
* /xiaoshuo/小说拼音-小说id/di-章节排序-zhang/章节分页
*/
Route::get('/xiaoshuo/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]', [Novel::class, 'getNovelChapter'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
Route::get('/novel/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]', [Novel::class, 'getNovelChapter'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
Route::get('/book/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]', [Novel::class, 'getNovelChapter'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
Route::get('/xiaoshuo-:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]', [Novel::class, 'getNovelChapter'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
Route::get('/novel-:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]', [Novel::class, 'getNovelChapter'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
Route::get('/book-:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]', [Novel::class, 'getNovelChapter'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
/**
* 小说章节 - pc
*/
Route::get('/pc/xiaoshuo/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]', [Novel::class, 'getNovelChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
Route::get('/pc/novel/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]', [Novel::class, 'getNovelChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
Route::get('/pc/book/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]', [Novel::class, 'getNovelChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
Route::get('/pc/xiaoshuo-:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]', [Novel::class, 'getNovelChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
Route::get('/pc/novel-:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]', [Novel::class, 'getNovelChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
Route::get('/pc/book-:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]', [Novel::class, 'getNovelChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
/**
* 最新章节-特殊页面处理-pc
*/
Route::get('/pc/xiaoshuo/:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/novel/:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/book/:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/xiaoshuo-:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/novel-:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/book-:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
/**
* 最新章节-特殊页面处理-h5
*/
Route::get('/xiaoshuo/:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/novel/:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/book/:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/xiaoshuo-:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/novel-:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/book-:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
/**
* 小说目录页面-h5
* /xiaoshuo/[小说拼音]-[小说id]/mulu/order/[page]
*/
Route::get('/xiaoshuo/:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
Route::get('/novel/:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
Route::get('/book/:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
Route::get('/xiaoshuo/:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
Route::get('/novel/:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
Route::get('/book/:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
/**
* 小说目录页面-pc
*/
Route::get('/pc/xiaoshuo/:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
Route::get('/pc/novel/:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
Route::get('/pc/book/:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
Route::get('/pc/xiaoshuo-:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
Route::get('/pc/novel-:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
Route::get('/pc/book-:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
/**
* 伪小说详情-pc
*/
Route::get('/pc/kan-xiaoshuo/:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/kan-novel/:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/kan-book/:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/kan-xiaoshuo-:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/kan-novel-:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/kan-book-:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
/**
* 伪小说详情-h5
*/
Route::get('/kan-xiaoshuo/:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/kan-novel/:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/kan-book/:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/kan-xiaoshuo-:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/kan-novel-:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/kan-book-:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
/**
* 小说详情-pc
* /xiaoshuo/{strPinYin}-{intNId}
* /novel/{strPinYin}-{intNId}
* /book/{strPinYin}-{intNId}
* /xiaoshuo-{strPinYin}-{intNId}
* /novel-{strPinYin}-{intNId}
* /book-{strPinYin}-{intNId}
*/
Route::get('/pc/xiaoshuo/:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/novel/:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/book/:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/xiaoshuo-:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 3])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/novel-:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 3])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/pc/book-:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 3])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
/**
* 小说详情-h5
*/
Route::get('/xiaoshuo/:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/novel/:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 2])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/book/:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/xiaoshuo-:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 3])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/novel-:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 3])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/book-:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 3])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
/**
* 搜索小说 - h5
*/
Route::get('/search', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => true]);
Route::get('/explore', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => true]);
Route::get('/sousuo', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => true]);
Route::get('/find', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => true]);
Route::get('/query', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => true]);
Route::get('/keywords', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => true]);
/**
* 搜索小说 - pc
*/
Route::get('/pc/search', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => false]);
Route::get('/pc/explore', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => false]);
Route::get('/pc/sousuo', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => false]);
Route::get('/pc/find', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => false]);
Route::get('/pc/query', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => false]);
Route::get('/pc/keywords', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => false]);
/**
* 小说用户中心 - h5
*/
Route::get('/user', [User::class, 'Index'])->append(['boolIsMobile' => true]);
Route::get('/my-account', [User::class, 'Index'])->append(['boolIsMobile' => true]);
Route::get('/profile', [User::class, 'Index'])->append(['boolIsMobile' => true]);
Route::get('/yonghu', [User::class, 'Index'])->append(['boolIsMobile' => true]);
Route::get('/wode-zhongxin', [User::class, 'Index'])->append(['boolIsMobile' => true]);
Route::get('/personal-center', [User::class, 'Index'])->append(['boolIsMobile' => true]);
/**
* 小说用户中心 - pc
*/
Route::get('/pc/user', [User::class, 'Index'])->append(['boolIsMobile' => false]);
Route::get('/pc/my-account', [User::class, 'Index'])->append(['boolIsMobile' => false]);
Route::get('/pc/profile', [User::class, 'Index'])->append(['boolIsMobile' => false]);
Route::get('/pc/yonghu', [User::class, 'Index'])->append(['boolIsMobile' => false]);
Route::get('/pc/wode-zhongxin', [User::class, 'Index'])->append(['boolIsMobile' => false]);
Route::get('/pc/personal-center', [User::class, 'Index'])->append(['boolIsMobile' => false]);
/**
* 书架 - h5
*/
Route::get('/bookshelf', [User::class, 'getBookShelf'])->append(['boolIsMobile' => true]);
Route::get('/book-shelf', [User::class, 'getBookShelf'])->append(['boolIsMobile' => true]);
Route::get('/reading-shelf', [User::class, 'getBookShelf'])->append(['boolIsMobile' => true]);
Route::get('/shujia', [User::class, 'getBookShelf'])->append(['boolIsMobile' => true]);
Route::get('/yuedu-shujia', [User::class, 'getBookShelf'])->append(['boolIsMobile' => true]);
Route::get('/book-collection', [User::class, 'getBookShelf'])->append(['boolIsMobile' => true]);
/**
* 书架 - pc
*/
Route::get('/pc/bookshelf', [User::class, 'getBookShelf'])->append(['boolIsMobile' => false]);
Route::get('/pc/book-shelf', [User::class, 'getBookShelf'])->append(['boolIsMobile' => false]);
Route::get('/pc/reading-shelf', [User::class, 'getBookShelf'])->append(['boolIsMobile' => false]);
Route::get('/pc/shujia', [User::class, 'getBookShelf'])->append(['boolIsMobile' => false]);
Route::get('/pc/yuedu-shujia', [User::class, 'getBookShelf'])->append(['boolIsMobile' => false]);
Route::get('/pc/book-collection', [User::class, 'getBookShelf'])->append(['boolIsMobile' => false]);
/**
* 历史记录 - h5
*/
Route::get('/history', [User::class, 'getHistory'])->append(['boolIsMobile' => true]);
Route::get('/reading-history', [User::class, 'getHistory'])->append(['boolIsMobile' => true]);
Route::get('/read-record', [User::class, 'getHistory'])->append(['boolIsMobile' => true]);
Route::get('/lishi', [User::class, 'getHistory'])->append(['boolIsMobile' => true]);
Route::get('/yuedu-lishi', [User::class, 'getHistory'])->append(['boolIsMobile' => true]);
Route::get('/browse-past', [User::class, 'getHistory'])->append(['boolIsMobile' => true]);
/**
* 历史记录 - pc
*/
Route::get('/pc/history', [User::class, 'getHistory'])->append(['boolIsMobile' => false]);
Route::get('/pc/reading-history', [User::class, 'getHistory'])->append(['boolIsMobile' => false]);
Route::get('/pc/read-record', [User::class, 'getHistory'])->append(['boolIsMobile' => false]);
Route::get('/pc/lishi', [User::class, 'getHistory'])->append(['boolIsMobile' => false]);
Route::get('/pc/yuedu-lishi', [User::class, 'getHistory'])->append(['boolIsMobile' => false]);
Route::get('/pc/browse-past', [User::class, 'getHistory'])->append(['boolIsMobile' => false]);
// 文章 列表
// Route::get('/article/list-[:intCategoryId]-[:intPage]', [Novel::class, 'getArticleList'])->append(['boolIsMobile' => true]);
// Route::get('/pc/article/list-[:intCategoryId]-[:intPage]', [Novel::class, 'getArticleList'])->append(['boolIsMobile' => false]);
// Route::get('/article/list', [Novel::class, 'getArticleList'])->append(['boolIsMobile' => true]);
// Route::get('/pc/article/list', [Novel::class, 'getArticleList'])->append(['boolIsMobile' => false]);
// // 文章 详情
// Route::get('/article/info-:intArticleId', [Novel::class, 'getArticleInfo'])->append(['boolIsMobile' => true]);
// Route::get('/pc/article/info-:intArticleId', [Novel::class, 'getArticleInfo'])->append(['boolIsMobile' => false]);
//分类 - 其它模板
// Route::get('class', 'Novel/getNovelCategory')->ext('html')->append(['boolIsMobile' => true]);
// Route::get('/pc/class', 'Novel/getNovelCategory')->ext('html')->append(['boolIsMobile' => false]);
// // //分类 使用模板:xmttxs
// // Route::get('/books', 'Novel/getNovelCategory')->ext('html')->append(['boolIsMobile' => true]);
// // Route::get('/pc/books', 'Novel/getNovelCategory')->ext('html')->append(['boolIsMobile' => false]);
// // Route::get('/books/[:intCategoryId]-[:intPage]', 'Novel/getNovelCategory')->ext('html')->append(['boolIsMobile' => true]);
// Route::get('/pc/fenlei/<intCategoryId]-[:intPage]', 'Novel/getNovelCategory')
// ->append(['boolIsMobile' => false])
// ->pattern(['intCategoryId' => '\d+','intPage' => '\d+',])
// ->ext('html');
// if(config('app.default_index_info_isopen')){
// # SEO首页-此为了 那些那详情页做首页推广的站点
// Route::get("/", "Novel/getDetail")->name("Novel@getDetail")->cache('/index.html', 600, 'index');
// // 影视首页
// Route::get("/nindex", "Novel/Index")->name("Novel@Index")->cache('/nindex.html', 600, 'nindex');
// }else{
// Route::get("/", "Novel/Index")->name("Novel@Index")->cache('/index.html', 600, 'index');
// }
// # 定义所有分类路由
// $arrRoutes = [
// # 小说推荐
// [
// 'class'=>[Novel::class,'getRankList'],
// 'name'=>'Novel@getTuijianList',
// 'path'=>[
// [::class,'tj/:intTjdj-[:intPage]'],
// [::class,'tuijian/:intTjdj-[:intPage]'],
// [::class,'recommend/:intTjdj-[:intPage]'],
// [::class,'nice/:intTjdj-[:intPage]'],
// [::class,'good/:intTjdj-[:intPage]'],
// [::class,'推荐/:intTjdj-[:intPage]'],
// ],
// ],
// # 小说分类
// [
// 'class'=>[Novel::class,'getCategoryList'],
// 'name'=>'Novel@getCategoryList',
// 'path'=>[
// [::class,'list/:intCId-:intSort-:intStatus-[:intPage]'],
// [::class,'fenlei/:intCId-:intSort-:intStatus-[:intPage]'],
// [::class,'class/:intCId-:intSort-:intStatus-[:intPage]'],
// [::class,'type/:intCId-:intSort-:intStatus-[:intPage]'],
// [::class,'leixin/:intCId-:intSort-:intStatus-[:intPage]'],
// [::class,'小说分类/:intCId-:intSort-:intStatus-[:intPage]'],
// ],
// ],
// # 小说排行
// [
// 'class'=>[Novel::class,'getNovelRankList'],
// 'name'=>'Novel@getNovelRankList',
// 'path'=>[
// [::class,'paihang/:intCId-:intSort-[:intPage]'],
// [::class,'paihanbang/:intCId-:intSort-[:intPage]'],
// [::class,'rank/:intCId-:intSort-[:intPage]'],
// [::class,'sort/:intCId-:intSort-[:intPage]'],
// [::class,'pb/:intCId-:intSort-[:intPage]'],
// [::class,'排行榜/:intCId-:intSort-[:intPage]'],
// ],
// ],
// # 小说章节
// [
// 'class'=>[Novel::class,'getReader'],
// 'name'=>'Novel@getReader',
// 'path'=>[
// [::class,'xq/:intNovelId/:intZhangJiePaiXu-[:strSort]'],
// [::class,'xiaoshuo/:intNovelId/:intZhangJiePaiXu-[:strSort]'],
// [::class,'novel/:intNovelId/:intZhangJiePaiXu-[:strSort]'],
// [::class,'info/:intNovelId/:intZhangJiePaiXu-[:strSort]'],
// [::class,'shu/:intNovelId/:intZhangJiePaiXu-[:strSort]'],
// [::class,'小说/:intNovelId/:intZhangJiePaiXu-[:strSort]'],
// [::class,'book/:intNovelId/:intZhangJiePaiXu-[:strSort]'],
// [::class,'kan/:intNovelId/:intZhangJiePaiXu-[:strSort]'],
// [::class,'show/:intNovelId/:intZhangJiePaiXu-[:strSort]'],
// [::class,'yuedu/:intNovelId/:intZhangJiePaiXu-[:strSort]'],
// [::class,'see/:intNovelId/:intZhangJiePaiXu-[:strSort]'],
// [::class,'相关/:intNovelId/:intZhangJiePaiXu-[:strSort]'],
// ],
// ],
// # 小说详情
// [
// 'class'=>[Novel::class,'getDetail'],
// 'name'=>'Novel@getDetail',
// 'path'=>[
// [::class,'xq/:intNovelId-[:intCurrentPage]-[:strSort]'],
// [::class,'xiaoshuo/:intNovelId-[:intCurrentPage]-[:strSort]'],
// [::class,'novel/:intNovelId-[:intCurrentPage]-[:strSort]'],
// [::class,'info/:intNovelId-[:intCurrentPage]-[:strSort]'],
// [::class,'shu/:intNovelId-[:intCurrentPage]-[:strSort]'],
// [::class,'小说/:intNovelId-[:intCurrentPage]-[:strSort]'],
// [::class,'book/:intNovelId-[:intCurrentPage]-[:strSort]'],
// [::class,'kan/:intNovelId-[:intCurrentPage]-[:strSort]'],
// [::class,'show/:intNovelId-[:intCurrentPage]-[:strSort]'],
// [::class,'yuedu/:intNovelId-[:intCurrentPage]-[:strSort]'],
// [::class,'see/:intNovelId-[:intCurrentPage]-[:strSort]'],
// [::class,'相关/:intNovelId-[:intCurrentPage]-[:strSort]'],
// ],
// ],
// # 搜索 - 小说
// [
// [class'=>'Search::class,'getNovel'],
// 'name'=>'Search@getNovel',
// 'path'=>[
// [::class,'search'],
// ],
// ],
// # 书架
// [
// [class'=>'Search::class,'getShujia'],
// [name'=>'Search::class,'getShujia'],
// 'path'=>[
// [::class,'shujia'],
// ],
// ],
// # 收藏
// [
// [class'=>'Search::class,'addSc'],
// [name'=>'Search::class,'addSc'],
// 'path'=>[
// [::class,'sc'],
// ],
// ],
// ];
// // Route::get('/sc', [Novel::class,'addSc'])
// // ->middleware('Throttle:5,60') // 限制 1 分钟内最多 5 次
// // ->name('Novel@addSc');
// # 遍历所有分类,注册路由
// foreach ($arrRoutes as $Routes) {
// foreach ($Routes['path'] as $strPath) {
// Route::get($strPath, $Routes['class'])
// ->name($Routes['name'])
// ->pattern([
// 'intTjdj' => '\d+', # 推荐等级
// 'intPage' => '\d+', # 分页
// 'intCId' => '\d+',
// 'intSort' => '\d+',
// 'intNovelId' => '\d+',
// 'intZhangJiePaiXu' => '\d+',
// 'strSort' => '\w+',
// 'intStatus' => '\d+',
// ])
// ->cache([$strPath, 3600, strtoupper($strPath) . '_PAGE']);
// }
// }