Merge branch 'dev' of ssh://git.bgbg.live:18150/root/SEONexus into dev

This commit is contained in:
Default
2025-04-11 23:43:10 +08:00
7 changed files with 1292 additions and 458 deletions

View File

@@ -7,360 +7,197 @@ use app\home\controller\Novel;
use app\home\controller\User;
use think\facade\Route;
# 路由别名,可以忽略 ->ext('html')
// Route::alias("/index.html", "/")->append(['boolIsMobile' => true]);
// Route::alias("/pc/index.html", "/")->append(['boolIsMobile' => false]);
/**
* 首页
*/
Route::get("/", [Index::class, 'index'])->ext('html')->append(['boolIsMobile' => true]);
Route::get("/pc/", [Index::class, 'getPcIndex'])->append(['boolIsMobile' => false]);
// Route::get("/index", [Index::class,'index'])->ext('html')->append(['boolIsMobile' => true]);
// Route::get("/pc/index", [Index::class,'getPcIndex'])->ext('html')->append(['boolIsMobile' => false]);
//排行榜
Route::get('/paihang/all', [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => true]);
Route::get("/pc/paihang/all", [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => false]);
/**
* 男生/女生 - grok 推荐最优方案
*
*/
Route::get('/nansheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'boys']);
Route::get('/nvsheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'girls']);
Route::get('/pc/nansheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'boys']);
Route::get('/pc/nvsheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'girls']);
/**
* 书库 - grok 推荐最优方案
* /shuku/strGender/category/status/page
*/
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('/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('/shuku/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => true]);
Route::get('/pc/shuku/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => false]);
/**
* 小说章节
* /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('/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/books/:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
/**
* 小说目录页面
* /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('/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+']);
/**
* kan-小说详情
*/
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('/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-]+',]);
/**
* 小说详情
* /book/{strPinYin}-{intNId}
* /novel/{strPinYin}-{intNId}
* /xiaoshuo/{strPinYin}-{intNId}
* /book-{strPinYin}-{intNId}
* /novel-{strPinYin}-{intNId}
* /xiaoshuo-{strPinYin}-{intNId}
*/
Route::get('/pc/book/:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->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/xiaoshuo/: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' => 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/xiaoshuo-:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 3])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
//h5
Route::get('/book/:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
->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('/xiaoshuo/: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' => 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('/xiaoshuo-:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 3])
->pattern(['n_id' => '\d+','name' => '[\w-]+',]);
// 搜索小说
Route::get('/search', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => true]);
Route::get('/pc/search', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => false]);
// 小说用户中心
Route::get('/user', [User::class, 'Index'])->append(['boolIsMobile' => true]);
Route::get('/pc/user', [User::class, 'Index'])->append(['boolIsMobile' => false]);
// 书架
Route::get('/bookshelf', [User::class, 'getBookShelf'])->append(['boolIsMobile' => true]);
Route::get('/pc/bookshelf', [User::class, 'getBookShelf'])->append(['boolIsMobile' => false]);
// 历史记录
Route::get('/history', [User::class, 'getHistory'])->append(['boolIsMobile' => true]);
Route::get('/pc/history', [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']);
// }
// }
// 路由配置文件
$arrRoutes = [
// H5/PC 端前缀
'prefixes' => [
'pc' => ['/pc', '/web', '/desktop', '/index', '/shouye', '/zhuomian'],
'h5' => '',
],
// 通用路径别名
'paths' => [
// 章节相关路径
'chapter' => [
'/xiaoshuo/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]',
'/novel/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]',
'/book/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]',
'/xiaoshuo-:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]',
'/novel-:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]',
'/book-:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]',
],
// 最新章节-特殊页面处理
'latest' => [
'/xiaoshuo/:name-:n_id/chapter/latest',
'/novel/:name-:n_id/chapter/latest',
'/book/:name-:n_id/chapter/latest',
'/xiaoshuo-:name-:n_id/chapter/latest',
'/novel-:name-:n_id/chapter/latest',
'/book-:name-:n_id/chapter/latest',
],
// 目录相关路径
'catalog' => [
'/xiaoshuo/:name-:intNovelId/mulu/:strOrder/[:intPage]',
'/novel/:name-:intNovelId/mulu/:strOrder/[:intPage]',
'/book/:name-:intNovelId/mulu/:strOrder/[:intPage]',
'/xiaoshuo/:name-:intNovelId/mulu/:strOrder/[:intPage]',
'/novel/:name-:intNovelId/mulu/:strOrder/[:intPage]',
'/book/:name-:intNovelId/mulu/:strOrder/[:intPage]',
],
// 伪小说详情相关路径
'kan-novel' => [
'/kan-xiaoshuo/:name-:n_id',
'/show-novel/:name-:n_id',
'/seo-book/:name-:n_id',
'/show-xiaoshuo-:name-:n_id',
'/see-novel-:name-:n_id',
'/good-book-:name-:n_id',
],
// 小说详情相关路径
'novel' => [
'/xiaoshuo/:name-:n_id',
'/novel/:name-:n_id',
'/book/:name-:n_id',
'/xiaoshuo-:name-:n_id',
'/novel-:name-:n_id',
'/book-:name-:n_id',
],
// 书库
'library' => [
'/shuku/:strGender/:strCategory/:strStatus/page:intPage',
'/books/:strGender/:strCategory/:strStatus/page:intPage',
'/library/:strGender/:strCategory/:strStatus/page:intPage',
'/fenlei/:strGender/:strCategory/:strStatus/page:intPage',
'/class/:strGender/:strCategory/:strStatus/page:intPage',
'/category/:strGender/:strCategory/:strStatus/page:intPage',
],
// 书库首页
'library-index' => [
'/shuku/all',
'/books/all',
'/library/all',
'/fenlei/all',
'/class/all',
'/category/all',
],
//排行榜
'rank' => ['/paihang/all', '/rank/all', '/paihang-quan', '/top/all', '/paihang-bang', '/ranks/all'],
// 男生
'boys' => ['/nansheng-xiaoshuo', '/boys-novel', '/nansheng-shu', '/man-read', '/nansheng-book', '/male-novels'],
//女生
'girls' => ['/nvsheng-xiaoshuo', '/girls-novel', '/nvsheng-shu', '/woman-read', '/nvsheng-book', '/female-novels'],
//搜索
'search' => ['/search', '/explore', '/sousuo', '/find', '/query', '/keywords'],
// 用户中心
'user' => ['/user', '/my-account', '/profile', '/yonghu', '/wode-zhongxin', '/personal-center'],
//书架
'bookshelf' => ['/bookshelf', '/book-shelf', '/reading-shelf', '/shujia', '/yuedu-shujia', '/book-collection'],
//历史记录
'history' => ['/history', '/reading-history', '/read-record', '/lishi', '/yuedu-lishi', '/browse-past'],
// 首页
'index' => ['/'],
],
];
// 遍历路由配置,动态注册 H5 和 PC 路由
foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
$prefixes = is_array($prefixes) ? $prefixes : [$prefixes];
$boolIsMobile = $platform === 'h5';
foreach ($prefixes as $strPath) {
foreach ($arrRoutes['paths'] as $key => $arrUrl) {
foreach ($arrUrl as $strUrl) {
$strRoute = $strPath . $strUrl;
switch ($key) {
case 'latest':
//最新章节
Route::get($strRoute, [Novel::class, 'getNovelLatestChapter'])
->append(['boolIsMobile' => $boolIsMobile])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
break;
case 'chapter':
//章节
Route::get($strRoute, [Novel::class, 'getNovelChapter'])
->append(['boolIsMobile' => $boolIsMobile])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
break;
case 'kan-novel':
//伪造小说详情
Route::get($strRoute, [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => $boolIsMobile])
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
break;
case 'novel':
//小说详情
Route::get($strRoute, [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => $boolIsMobile])
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
break;
case 'catalog':
//目录
Route::get($strRoute, [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => $boolIsMobile])
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
break;
case 'library':
//书库/分类
Route::get($strRoute, [Novel::class, 'getLibrary'])
->append(['boolIsMobile' => $boolIsMobile])
->pattern([
'strGender' => 'nansheng-xiaoshuo|nvsheng-xiaoshuo|all',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
'intPage' => '\d+'
]);
break;
case 'library-index':
//书库/分类首页
Route::get($strRoute, [Novel::class, 'getLibrary'])->append(['boolIsMobile' => $boolIsMobile]);
break;
case 'rank':
//排行榜
Route::get($strRoute, [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => $boolIsMobile]);
break;
case 'boys':
//男生
Route::get($strRoute, [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => $boolIsMobile, 'strChannel' => 'boys']);
break;
case 'girls':
//女生
Route::get($strRoute, [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => $boolIsMobile, 'strChannel' => 'girls']);
break;
case 'search':
//搜素
Route::get($strRoute, [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => $boolIsMobile]);
break;
case 'user':
//用户中心
Route::get($strRoute, [User::class, 'Index'])->append(['boolIsMobile' => $boolIsMobile]);
break;
case 'bookshelf':
//书架
Route::get($strRoute, [User::class, 'getBookShelf'])->append(['boolIsMobile' => $boolIsMobile]);
break;
case 'history':
//历史记录
Route::get($strRoute, [User::class, 'getHistory'])->append(['boolIsMobile' => $boolIsMobile]);
break;
case 'index':
// 首页
if ($platform == 'h5') {
Route::get($strRoute, [Index::class, 'index'])->append(['boolIsMobile' => $boolIsMobile]);
}else{
Route::get($strRoute, [Index::class, 'getPcIndex'])->append(['boolIsMobile' => $boolIsMobile]);
}
break;
}
}
}
}
}

View File

@@ -17,6 +17,7 @@
<link rel="stylesheet" href="//at.alicdn.com/t/font_934628_byagqjb6vae.css" type="text/css">
<link rel="stylesheet" href="/public/layer/need/layer.css" type="text/css">
<!-- <script src="/public/jquery/jquery-3.7.1.min.js"></script> -->
<script src="/public/js/yueduqsbs.js"></script>
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$arrNovel['og_novel_book_name']??'未知小说'} {$arrChapter.name} - {$DomainModel->d_name}" />
@@ -112,8 +113,8 @@
</div>
<article id="chapterContent" class="read-article" style="font-size: 1.125rem">
<section class="read-section jsChapterWrapper" data-chapter-id="4b2d5aab58d71">
{$arrChapter.content|raw}
<script>document.writeln(qsbs.bb('{$arrChapter.content}'));</script>
</section>
</article>
{$arrGRM[5]|raw}

View File

@@ -66,6 +66,8 @@
}
}
</script>
<script src="/public/js/yueduqsbs.js"></script>
</head>
<body class="theme-0 w800" data-bid='/pc/xiaoshuo/name-1'>
@@ -202,7 +204,7 @@
</div>
<div class="read-content j_readContent">
{if $arrChapter && $arrChapter.content}
{$arrChapter.content|raw }
<script>document.writeln(qsbs.bb('{$arrChapter.content}'));</script>
{/if}
</div>
</div>

View File

@@ -18,21 +18,21 @@ class TemplateSeeder
$arrSubjectFomartGroupData = [
// TKD
'INDEX@INDEX@TITLE' => [
'description' => '首页Title 替换模板分组ID',
'description' => '首页Title 模板分组',
'sfg_id' => 1,
'arrSubjectFomart' => [
'{strIndexTitle}',
]
],
'INDEX@INDEX@KEYWORDS' => [
'description' => '首页Keywords 替换模板分组ID',
'description' => '首页Keywords 模板分组',
'sfg_id' => 2,
'arrSubjectFomart' => [
'{strIndexKeywords}',
]
],
'INDEX@INDEX@DESCRIPTION' => [
'description' => '首页Description 替换模板分组ID',
'description' => '首页Description 模板分组',
'sfg_id' => 3,
'arrSubjectFomart' => [
'{strIndexDescription}',
@@ -40,21 +40,21 @@ class TemplateSeeder
],
'NOVEL@GETLIBRARY@TITLE' => [
'description' => '分类书库Title 替换模板分组ID',
'description' => '分类书库Title 模板分组',
'sfg_id' => 4,
'arrSubjectFomart' => [
'{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName} - 第{intPage}页',
]
],
'NOVEL@GETLIBRARY@KEYWORDS' => [
'description' => '分类书库Keywords 替换模板分组ID',
'description' => '分类书库Keywords 模板分组',
'sfg_id' => 5,
'arrSubjectFomart' => [
'{strNovelCategoryName}小说, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费小说, 在线阅读',
]
],
'NOVEL@GETLIBRARY@DESCRIPTION' => [
'description' => '分类书库Description 替换模板分组ID',
'description' => '分类书库Description 模板分组',
'sfg_id' => 6,
'arrSubjectFomart' => [
'{strSiteName}提供{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说免费在线阅读,第{intPage}页精选热门作品,畅享{strSiteDomain}',
@@ -62,21 +62,21 @@ class TemplateSeeder
],
'NOVEL@GETNOVELCHANNEL@TITLE' => [
'description' => '男女生Title 替换模板分组ID',
'description' => '男女生Title 模板分组',
'sfg_id' => 7,
'arrSubjectFomart' => [
'{strNovelSex}小说 - {strSiteName} - 免费阅读 - 第{intPage}页',
]
],
'NOVEL@GETNOVELCHANNEL@KEYWORDS' => [
'description' => '男女生Keywords 替换模板分组ID',
'description' => '男女生Keywords 模板分组',
'sfg_id' => 8,
'arrSubjectFomart' => [
'{strNovelSex}小说 - {strSiteKeywords} - 免费阅读 - 第{intPage}页',
]
],
'NOVEL@GETNOVELCHANNEL@DESCRIPTION' => [
'description' => '男女生Description 替换模板分组ID',
'description' => '男女生Description 模板分组',
'sfg_id' => 9,
'arrSubjectFomart' => [
'{strNovelSex}小说 - {strSiteName} - 免费阅读 - 第{intPage}页',
@@ -84,7 +84,7 @@ class TemplateSeeder
],
'NOVEL@GETNOVELINFO@TITLE' => [
'description' => '详情Title 替换模板分组ID',
'description' => '详情Title 模板分组',
'sfg_id' => 10,
'arrSubjectFomart' => [
'{strNovelName} - {strNovelAuthor}- {strNovelCategoryName} - 免费在线阅读 - {strSiteName}',
@@ -121,7 +121,7 @@ class TemplateSeeder
]
],
'NOVEL@GETNOVELINFO@KEYWORDS' => [
'description' => '详情Keywords 替换模板分组ID',
'description' => '详情Keywords 模板分组',
'sfg_id' => 11,
'arrSubjectFomart' => [
'{strNovelName}, {strNovelAuthor}, {strNovelCategoryName}, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费阅读',
@@ -136,7 +136,7 @@ class TemplateSeeder
]
],
'NOVEL@GETNOVELINFO@DESCRIPTION' => [
'description' => '详情Description 替换模板分组ID',
'description' => '详情Description 模板分组',
'sfg_id' => 12,
'arrSubjectFomart' => [
'{strSiteName}提供{strNovelName}免费在线阅读,{strNovelAuthor}创作的{strNovelCategoryName}{strNovelStatus}小说,{strNovelDescription},欢迎体验{strSiteDomain}',
@@ -156,21 +156,21 @@ class TemplateSeeder
],
'NOVEL@GETNOVELCHAPTERALL@TITLE' => [
'description' => '目录Title 替换模板分组ID',
'description' => '目录Title 模板分组',
'sfg_id' => 13,
'arrSubjectFomart' => [
'{strNovelName}章节目录 - {strNovelAuthor} - 免费查看 - {strSiteName} 第{intPage}页',
]
],
'NOVEL@GETNOVELCHAPTERALL@KEYWORDS' => [
'description' => '目录Keywords 替换模板分组ID',
'description' => '目录Keywords 模板分组',
'sfg_id' => 14,
'arrSubjectFomart' => [
'{strNovelName}, 章节目录, {strNovelAuthor}, {strNovelCategoryName}, 免费阅读,{strNovelSex}小说, {strSiteKeywords}, {strSiteName}',
]
],
'NOVEL@GETNOVELCHAPTERALL@DESCRIPTION' => [
'description' => '目录Description 替换模板分组ID',
'description' => '目录Description 模板分组',
'sfg_id' => 15,
'arrSubjectFomart' => [
@@ -179,7 +179,7 @@ class TemplateSeeder
],
'NOVEL@GETNOVELCHAPTER@TITLE' => [
'description' => '内容Title 替换模板分组ID',
'description' => '内容Title 模板分组',
'sfg_id' => 16,
'arrSubjectFomart' => [
'{strNovelName} {strNovelChapterName} - {strNovelAuthor} - 免费阅读 - {strSiteName}',
@@ -187,14 +187,14 @@ class TemplateSeeder
]
],
'NOVEL@GETNOVELCHAPTER@KEYWORDS' => [
'description' => '内容Keywords 替换模板分组ID',
'description' => '内容Keywords 模板分组',
'sfg_id' => 17,
'arrSubjectFomart' => [
'{strNovelName}, {strNovelChapterName}, {strNovelAuthor}, {strSiteKeywords}, 免费阅读, {strSiteName}',
]
],
'NOVEL@GETNOVELCHAPTER@DESCRIPTION' => [
'description' => '内容Description 替换模板分组ID',
'description' => '内容Description 模板分组',
'sfg_id' => 18,
'arrSubjectFomart' => [
'{strNovelName}{strNovelChapterName}免费在线阅读,{strNovelAuthor}著。{strChapterDescription},快来{strSiteName}畅读精彩章节!',
@@ -202,21 +202,21 @@ class TemplateSeeder
],
'NOVEL@GETNOVELRANK@TITLE' => [
'description' => '排行榜Title 替换模板分组ID',
'description' => '排行榜Title 模板分组',
'sfg_id' => 19,
'arrSubjectFomart' => [
'小说排行榜 - {strSiteName} - 第{intPage}页',
]
],
'NOVEL@GETNOVELRANK@KEYWORDS' => [
'description' => '排行榜Keywords 替换模板分组ID',
'description' => '排行榜Keywords 模板分组',
'sfg_id' => 20,
'arrSubjectFomart' => [
'小说排行榜, 热门小说, 小说推荐, {strSiteKeywords}, {strSiteName}, 免费阅读',
]
],
'NOVEL@GETNOVELRANK@DESCRIPTION' => [
'description' => '排行榜Description 替换模板分组ID',
'description' => '排行榜Description 模板分组',
'sfg_id' => 21,
'arrSubjectFomart' => [
'{strSiteName}提供小说排行榜,第{intPage}页精选热门小说免费阅读,最新排行一览无余,畅享{strSiteDomain}',
@@ -224,21 +224,21 @@ class TemplateSeeder
],
'NOVEL@GETSEARCHNOVEL@TITLE' => [
'description' => '搜索页Title 替换模板分组ID',
'description' => '搜索页Title 模板分组',
'sfg_id' => 22,
'arrSubjectFomart' => [
'{strSearchKeywords} - {strSiteName}搜索 - 第{intPage}页',
]
],
'NOVEL@GETSEARCHNOVEL@KEYWORDS' => [
'description' => '搜索页Keywords 替换模板分组ID',
'description' => '搜索页Keywords 模板分组',
'sfg_id' => 23,
'arrSubjectFomart' => [
'{strSearchKeywords}, {strSiteName}, 免费阅读, 在线搜索, 第{intPage}页',
]
],
'NOVEL@GETSEARCHNOVEL@DESCRIPTION' => [
'description' => '搜索页Description 替换模板分组ID',
'description' => '搜索页Description 模板分组',
'sfg_id' => 24,
'arrSubjectFomart' => [
'{strSearchKeywords}搜索结果尽在{strSiteName},第{intPage}页提供免费阅读,访问{strSiteDomain}立即体验!',
@@ -247,28 +247,28 @@ class TemplateSeeder
// URL
'CATEGORY_INFO_URL' => [
'description' => '分类书库URL 替换模板分组ID',
'description' => '分类书库URL 模板1',
'sfg_id' => 25,
'arrSubjectFomart' => [
'/shuku/{strGender}/{strCategory}/{strStatus}/page{intPage}',
]
],
'NAN_SHENG_URL' => [
'description' => '男生URL 替换模板分组ID',
'description' => '男生URL 模板1',
'sfg_id' => 26,
'arrSubjectFomart' => [
'/nansheng-xiaoshuo',
]
],
'NV_SHENG_URL' => [
'description' => '女生URL 替换模板分组ID',
'description' => '女生URL 模板1',
'sfg_id' => 27,
'arrSubjectFomart' => [
'/nvsheng-xiaoshuo',
]
],
'RANK_INFO_URL' => [
'description' => '排行榜URL 替换模板分组ID',
'description' => '排行榜URL 模板1',
'sfg_id' => 28,
'arrSubjectFomart' => [
'/paihang/all',
@@ -281,60 +281,81 @@ class TemplateSeeder
'/xiaoshuo/{strPinYin}-{intNId}',
]
],
'KAN_NOVEL_INFO_URL' => [
'description' => 'kan小说详情URL 替换模板分组ID',
'description' => 'kan小说详情URL 模板1',
'sfg_id' => 30,
'arrSubjectFomart' => [
'/kan-xiaoshuo/{strPinYin}-{intNId}',
]
],
'TABLE_INFO_URL' => [
'description' => '小说目录URL 替换模板分组ID',
'description' => '小说目录URL 模板1',
'sfg_id' => 31,
'arrSubjectFomart' => [
'/xiaoshuo/{strPinYin}-{intNId}/mulu/{strOrder}/{intPage}',
]
],
'CONTENT_INFO_URL' => [
'description' => '内容章节URL 替换模板分组ID',
'description' => '内容章节URL 模板1',
'sfg_id' => 32,
'arrSubjectFomart' => [
'/xiaoshuo/{strPinYin}-{intNId}/zhang-{intChapterSort}/{intChapterPage}',
]
],
'NEWS_CONTENT_INFO_URL' => [
'description' => '最新章节特殊页URL 替换模板分组ID',
'description' => '最新章节特殊页URL 模板1',
'sfg_id' => 33,
'arrSubjectFomart' => [
'/books/{strPinYin}-{intNId}/chapter/latest',
]
],
'SEARCH_INFO_URL' => [
'description' => '搜索页URL 替换模板分组ID',
'description' => '搜索页URL 模板1',
'sfg_id' => 34,
'arrSubjectFomart' => [
'/search.html?keywords={strSearchKeywords}&page={intPage}',
]
],
'HISTORY_INFO_URL' => [
'description' => '历史记录URL 模板1',
'sfg_id' => 89,
'arrSubjectFomart' => [
'/history',
]
],
'SHUJIA_INFO_URL' => [
'description' => '书架URL 模板1',
'sfg_id' => 90,
'arrSubjectFomart' => [
'/bookshelf',
]
],
'USER_INFO_URL' => [
'description' => '用户中心URL 模板1',
'sfg_id' => 91,
'arrSubjectFomart' => [
'/user',
]
],
// SEO 丰富内容
'INDEX_POPULAR_NOVELS' => [
'description' => '首页热门小说介绍 替换模板分组ID',
'description' => '首页热门小说介绍 模板分组',
'sfg_id' => 35,
'arrSubjectFomart' => [
'精选全网热评佳作,涵盖玄幻冒险、都市传奇、穿越重生等多种类型,带你领略最受欢迎的阅读热潮,快来发现你的下一本心动之作!',
]
],
'INDEX_NEWS_NOVELS' => [
'description' => '首页最新小说介绍 替换模板分组ID',
'description' => '首页最新小说介绍 模板分组',
'sfg_id' => 37,
'arrSubjectFomart' => [
'每日更新最新章节,囊括玄幻修真、都市爽文、重生逆袭等热门题材,紧跟作者步伐,第一时间畅读新鲜故事!',
]
],
'INDEX_RANK_NOVELS' => [
'description' => '首页小说排行榜介绍 替换模板分组ID',
'description' => '首页小说排行榜介绍 模板分组',
'sfg_id' => 38,
'arrSubjectFomart' => [
'汇聚读者最爱的小说排行,日榜、周榜、月榜一网打尽,玄幻巅峰、都市热血、完结经典全都有,助你快速找到高人气好书!',
@@ -342,41 +363,41 @@ class TemplateSeeder
],
];
// 公共的替换模板分组
// 公共的替换模板分组-url
$arrPublicSubjectFomartGroupData = [
// URL
// 分类书库URL url
'CATEGORY_INFO_URL_T2' => [
'description' => '分类书库URL 模板2',
'sfg_id' => 29,
'sfg_id' => 39,
'arrSubjectFomart' => [
'/books/{strGender}/{strCategory}/{strStatus}/page{intPage}',
]
],
'CATEGORY_INFO_URL_T3' => [
'description' => '分类书库URL 模板3',
'sfg_id' => 29,
'sfg_id' => 40,
'arrSubjectFomart' => [
'/library/{strGender}/{strCategory}/{strStatus}/page{intPage}',
]
],
'CATEGORY_INFO_URL_T4' => [
'description' => '分类书库URL 模板4',
'sfg_id' => 29,
'sfg_id' => 41,
'arrSubjectFomart' => [
'/fenlei/{strGender}/{strCategory}/{strStatus}/page{intPage}',
]
],
'CATEGORY_INFO_URL_T5' => [
'description' => '分类书库URL 模板5',
'sfg_id' => 29,
'sfg_id' => 42,
'arrSubjectFomart' => [
'/class/{strGender}/{strCategory}/{strStatus}/page{intPage}',
]
],
'CATEGORY_INFO_URL_T6' => [
'description' => '分类书库URL 模板6',
'sfg_id' => 29,
'sfg_id' => 43,
'arrSubjectFomart' => [
'/category/{strGender}/{strCategory}/{strStatus}/page{intPage}',
]
@@ -385,35 +406,35 @@ class TemplateSeeder
// 男生小说频道URL 模板1
'NAN_SHENG_URL_T2' => [
'description' => '男生小说频道URL 模板2',
'sfg_id' => 26,
'sfg_id' => 44,
'arrSubjectFomart' => [
'/boys-novel'
]
],
'NAN_SHENG_URL_T3' => [
'description' => '男生小说频道URL 模板3',
'sfg_id' => 26,
'sfg_id' => 45,
'arrSubjectFomart' => [
'/nansheng-shu'
]
],
'NAN_SHENG_URL_T4' => [
'description' => '男生小说频道URL 模板4',
'sfg_id' => 26,
'sfg_id' => 46,
'arrSubjectFomart' => [
'/man-read'
]
],
'NAN_SHENG_URL_T5' => [
'description' => '男生小说频道URL 模板5',
'sfg_id' => 26,
'sfg_id' => 47,
'arrSubjectFomart' => [
'/nansheng-book'
]
],
'NAN_SHENG_URL_T6' => [
'description' => '男生小说频道URL 模板6',
'sfg_id' => 26,
'sfg_id' => 48,
'arrSubjectFomart' => [
'/male-novels'
]
@@ -423,72 +444,72 @@ class TemplateSeeder
// 女生小说频道URL 模板1
'NV_SHENG_URL_T2' => [
'description' => '女生URL 模板2',
'sfg_id' => 26,
'sfg_id' => 49,
'arrSubjectFomart' => [
'/girls-novel'
]
],
'NV_SHENG_URL_T3' => [
'description' => '女生URL 模板3',
'sfg_id' => 26,
'sfg_id' => 50,
'arrSubjectFomart' => [
'/nvsheng-shu'
]
],
'NV_SHENG_URL_T4' => [
'description' => '女生URL 模板4',
'sfg_id' => 26,
'sfg_id' => 51,
'arrSubjectFomart' => [
'/woman-read'
]
],
'NV_SHENG_URL_T5' => [
'description' => '女生URL 模板5',
'sfg_id' => 26,
'sfg_id' => 52,
'arrSubjectFomart' => [
'/nvsheng-book'
]
],
'NV_SHENG_URL_T6' => [
'description' => '女生URL 模板6',
'sfg_id' => 26,
'sfg_id' => 53,
'arrSubjectFomart' => [
'/female-novels'
]
],
// 女生小说频道URL 模板1
// 排行榜
'RANK_INFO_URL_T2' => [
'description' => '排行榜URL 模板2',
'sfg_id' => 26,
'sfg_id' => 54,
'arrSubjectFomart' => [
'/rank/all'
]
],
'RANK_INFO_URL_T3' => [
'description' => '排行榜URL 模板3',
'sfg_id' => 26,
'sfg_id' => 55,
'arrSubjectFomart' => [
'/paihang-quan'
]
],
'RANK_INFO_URL_T4' => [
'description' => '排行榜URL 模板4',
'sfg_id' => 26,
'sfg_id' => 56,
'arrSubjectFomart' => [
'/top/all'
]
],
'RANK_INFO_URL_T5' => [
'description' => '排行榜URL 模板5',
'sfg_id' => 26,
'sfg_id' => 57,
'arrSubjectFomart' => [
'/paihang-bang'
]
],
'RANK_INFO_URL_T6' => [
'description' => '排行榜URL 模板6',
'sfg_id' => 26,
'sfg_id' => 58,
'arrSubjectFomart' => [
'/ranks/all'
]
@@ -497,35 +518,35 @@ class TemplateSeeder
// 小说详情 url
'NOVEL_INFO_URL_T2' => [
'description' => '小说详情URL 模板2',
'sfg_id' => 29,
'sfg_id' => 59,
'arrSubjectFomart' => [
'/novel/{strPinYin}-{intNId}',
]
],
'NOVEL_INFO_URL_T3' => [
'description' => '小说详情URL 模板3',
'sfg_id' => 29,
'sfg_id' => 60,
'arrSubjectFomart' => [
'/book/{strPinYin}-{intNId}',
]
],
'NOVEL_INFO_URL_T4' => [
'description' => '小说详情URL 模板4',
'sfg_id' => 29,
'sfg_id' => 61,
'arrSubjectFomart' => [
'/xiaoshuo-{strPinYin}-{intNId}',
]
],
'NOVEL_INFO_URL_T5' => [
'description' => '小说详情URL 模板5',
'sfg_id' => 29,
'sfg_id' => 62,
'arrSubjectFomart' => [
'/novel-{strPinYin}-{intNId}',
]
],
'NOVEL_INFO_URL_T6' => [
'description' => '小说详情URL 模板6',
'sfg_id' => 29,
'sfg_id' => 63,
'arrSubjectFomart' => [
'/book-{strPinYin}-{intNId}',
]
@@ -534,35 +555,35 @@ class TemplateSeeder
// 伪小说详情 url
'KAN_NOVEL_INFO_URL_T2' => [
'description' => '伪小说详情URL 模板2',
'sfg_id' => 29,
'sfg_id' => 64,
'arrSubjectFomart' => [
'/kan-novel/{strPinYin}-{intNId}',
]
],
'KAN_NOVEL_INFO_URL_T3' => [
'description' => '伪小说详情URL 模板3',
'sfg_id' => 29,
'sfg_id' => 65,
'arrSubjectFomart' => [
'/kan-book/{strPinYin}-{intNId}',
]
],
'KAN_NOVEL_INFO_URL_T4' => [
'description' => '伪小说详情URL 模板4',
'sfg_id' => 29,
'sfg_id' => 66,
'arrSubjectFomart' => [
'/kan-xiaoshuo-{strPinYin}-{intNId}',
]
],
'KAN_NOVEL_INFO_URL_T5' => [
'description' => '伪小说详情URL 模板5',
'sfg_id' => 29,
'sfg_id' => 67,
'arrSubjectFomart' => [
'/kan-novel-{strPinYin}-{intNId}',
]
],
'KAN_NOVEL_INFO_URL_T6' => [
'description' => '伪小说详情URL 模板6',
'sfg_id' => 29,
'sfg_id' => 68,
'arrSubjectFomart' => [
'/kan-book-{strPinYin}-{intNId}',
]
@@ -571,35 +592,35 @@ class TemplateSeeder
// 小说详情目录 url
'TABLE_INFO_URL_T2' => [
'description' => '小说目录URL 模板2',
'sfg_id' => 29,
'sfg_id' => 69,
'arrSubjectFomart' => [
'/novel/{strPinYin}-{intNId}/mulu/{strOrder}/{intPage}',
]
],
'TABLE_INFO_URL_T3' => [
'description' => '小说目录URL 模板3',
'sfg_id' => 29,
'sfg_id' => 70,
'arrSubjectFomart' => [
'/book/{strPinYin}-{intNId}/mulu/{strOrder}/{intPage}',
]
],
'TABLE_INFO_URL_T4' => [
'description' => '小说目录URL 模板4',
'sfg_id' => 29,
'sfg_id' => 71,
'arrSubjectFomart' => [
'/xiaoshuo-{strPinYin}-{intNId}/mulu/{strOrder}/{intPage}',
]
],
'TABLE_INFO_URL_T5' => [
'description' => '小说目录URL 模板5',
'sfg_id' => 29,
'sfg_id' => 72,
'arrSubjectFomart' => [
'/novel-{strPinYin}-{intNId}/mulu/{strOrder}/{intPage}',
]
],
'TABLE_INFO_URL_T6' => [
'description' => '小说目录URL 模板6',
'sfg_id' => 29,
'sfg_id' => 73,
'arrSubjectFomart' => [
'/book-{strPinYin}-{intNId}/mulu/{strOrder}/{intPage}',
]
@@ -608,35 +629,35 @@ class TemplateSeeder
// 小说章节 url
'CONTENT_INFO_T2' => [
'description' => '内容章节URL 模板2',
'sfg_id' => 29,
'sfg_id' => 74,
'arrSubjectFomart' => [
'/novel/{strPinYin}-{intNId}/zhang-{intChapterSort}/{intChapterPage}',
]
],
'CONTENT_INFO_T3' => [
'description' => '内容章节URL 模板3',
'sfg_id' => 29,
'sfg_id' => 75,
'arrSubjectFomart' => [
'/book/{strPinYin}-{intNId}/zhang-{intChapterSort}/{intChapterPage}',
]
],
'CONTENT_INFO_T4' => [
'description' => '内容章节URL 模板4',
'sfg_id' => 29,
'sfg_id' => 76,
'arrSubjectFomart' => [
'/xiaoshuo-{strPinYin}-{intNId}/zhang-{intChapterSort}/{intChapterPage}',
]
],
'CONTENT_INFO_T5' => [
'description' => '内容章节URL 模板5',
'sfg_id' => 29,
'sfg_id' => 77,
'arrSubjectFomart' => [
'/novel-{strPinYin}-{intNId}/zhang-{intChapterSort}/{intChapterPage}',
]
],
'CONTENT_INFO_T6' => [
'description' => '内容章节URL 模板6',
'sfg_id' => 29,
'sfg_id' => 78,
'arrSubjectFomart' => [
'/book-{strPinYin}-{intNId}/zhang-{intChapterSort}/{intChapterPage}',
]
@@ -653,35 +674,35 @@ class TemplateSeeder
*/
'NEWS_CONTENT_INFO_T2' => [
'description' => '最新内容章节URL 模板2',
'sfg_id' => 29,
'sfg_id' => 79,
'arrSubjectFomart' => [
'/novel/{strPinYin}-{intNId}/chapter/latest',
]
],
'NEWS_CONTENT_INFO_T3' => [
'description' => '最新内容章节URL 模板3',
'sfg_id' => 29,
'sfg_id' => 80,
'arrSubjectFomart' => [
'/book/{strPinYin}-{intNId}/chapter/latest',
]
],
'NEWS_CONTENT_INFO_T4' => [
'description' => '最新内容章节URL 模板4',
'sfg_id' => 29,
'sfg_id' => 81,
'arrSubjectFomart' => [
'/xiaoshuo-{strPinYin}-{intNId}/chapter/latest',
]
],
'NEWS_CONTENT_INFO_T5' => [
'description' => '最新内容章节URL 模板5',
'sfg_id' => 29,
'sfg_id' => 82,
'arrSubjectFomart' => [
'/novel-{strPinYin}-{intNId}/chapter/latest',
]
],
'NEWS_CONTENT_INFO_T6' => [
'description' => '最新内容章节URL 模板6',
'sfg_id' => 29,
'sfg_id' => 83,
'arrSubjectFomart' => [
'/book-{strPinYin}-{intNId}/chapter/latest',
]
@@ -690,42 +711,159 @@ class TemplateSeeder
// 搜索页
'SEARCH_INFO_URL_T2' => [
'description' => '搜索页URL 模板2',
'sfg_id' => 29,
'sfg_id' => 84,
'arrSubjectFomart' => [
'/explore.html?keywords={strSearchKeywords}&page={intPage}',
]
],
'SEARCH_INFO_URL_T3' => [
'description' => '搜索页URL 模板3',
'sfg_id' => 29,
'sfg_id' => 85,
'arrSubjectFomart' => [
'/s.html?keywords={strSearchKeywords}&page={intPage}',
'/sousuo.html?keywords={strSearchKeywords}&page={intPage}',
]
],
'SEARCH_INFO_URL_T4' => [
'description' => '搜索页URL 模板4',
'sfg_id' => 29,
'sfg_id' => 86,
'arrSubjectFomart' => [
'/find.html?keywords={strSearchKeywords}&page={intPage}',
]
],
'SEARCH_INFO_URL_T5' => [
'description' => '搜索页URL 模板5',
'sfg_id' => 29,
'sfg_id' => 87,
'arrSubjectFomart' => [
'/query.html?keywords={strSearchKeywords}&page={intPage}',
]
],
'SEARCH_INFO_URL_T6' => [
'description' => '搜索页URL 模板6',
'sfg_id' => 29,
'sfg_id' => 88,
'arrSubjectFomart' => [
'/keywords.html?keywords={strSearchKeywords}&page={intPage}',
]
],
// 历史记录
'HISTORY_INFO_URL_T2' => [
'description' => '历史记录URL 模板2',
'sfg_id' => 92,
'arrSubjectFomart' => [
'/reading-history',
]
],
'HISTORY_INFO_URL_T3' => [
'description' => '历史记录URL 模板3',
'sfg_id' => 93,
'arrSubjectFomart' => [
'/read-record',
]
],
'HISTORY_INFO_URL_T4' => [
'description' => '历史记录URL 模板4',
'sfg_id' => 94,
'arrSubjectFomart' => [
'/lishi',
]
],
'HISTORY_INFO_URL_T5' => [
'description' => '历史记录URL 模板5',
'sfg_id' => 95,
'arrSubjectFomart' => [
'/yuedu-lishi',
]
],
'HISTORY_INFO_URL_T6' => [
'description' => '历史记录URL 模板6',
'sfg_id' => 96,
'arrSubjectFomart' => [
'/browse-past',
]
],
// 历史记录
'SHUJIA_INFO_URL_T2' => [
'description' => '书架URL 模板2',
'sfg_id' => 97,
'arrSubjectFomart' => [
'/book-shelf',
]
],
'SHUJIA_INFO_URL_T3' => [
'description' => '书架URL 模板3',
'sfg_id' => 98,
'arrSubjectFomart' => [
'/reading-shelf',
]
],
'SHUJIA_INFO_URL_T4' => [
'description' => '书架URL 模板4',
'sfg_id' => 99,
'arrSubjectFomart' => [
'/shujia',
]
],
'SHUJIA_INFO_URL_T5' => [
'description' => '书架URL 模板5',
'sfg_id' => 100,
'arrSubjectFomart' => [
'/yuedu-shujia',
]
],
'SHUJIA_INFO_URL_T6' => [
'description' => '书架URL 模板6',
'sfg_id' => 101,
'arrSubjectFomart' => [
'/book-collection',
]
],
// 用户中心
'USER_INFO_URL_T2' => [
'description' => '用户中心URL 模板2',
'sfg_id' => 102,
'arrSubjectFomart' => [
'/my-account',
]
],
'USER_INFO_URL_T3' => [
'description' => '用户中心URL 模板3',
'sfg_id' => 103,
'arrSubjectFomart' => [
'/profile',
]
],
'USER_INFO_URL_T4' => [
'description' => '用户中心URL 模板4',
'sfg_id' => 104,
'arrSubjectFomart' => [
'/yonghu',
]
],
'USER_INFO_URL_T5' => [
'description' => '用户中心URL 模板5',
'sfg_id' => 105,
'arrSubjectFomart' => [
'/wode-zhongxin',
]
],
'USER_INFO_URL_T6' => [
'description' => '用户中心URL 模板6',
'sfg_id' => 106,
'arrSubjectFomart' => [
'/personal-center',
]
],
// 最新替换模板分组id 106
];
// 所有 替换模板分组
$arrAllSubjectFomartGroupData = array_merge($arrSubjectFomartGroupData, $arrPublicSubjectFomartGroupData);
/**
* 视图模板 数据播种
*/
@@ -798,10 +936,9 @@ class TemplateSeeder
],
];
self::initTemplate($arrTemplateData);
self::initSubjectFomartGroup($arrSubjectFomartGroupData);
self::initSubjectFomartGroup($arrAllSubjectFomartGroupData);
self::initSite($arrSiteData);
}
@@ -844,8 +981,8 @@ class TemplateSeeder
$SubjectFomartGroupItem = [
'sfg_id' => $SubjectFomartGroup['sfg_id'],
'sfg_name' => str_replace(" 替换模板分组ID", "", $SubjectFomartGroup['description']),
'sfg_description' => str_replace(" 替换模板分组ID", "", $SubjectFomartGroup['description']),
'sfg_name' => str_replace(" 模板分组", "", $SubjectFomartGroup['description']),
'sfg_description' => str_replace(" 模板分组", "", $SubjectFomartGroup['description']),
];
foreach ($SubjectFomartGroup['arrSubjectFomart'] as $SubjectFomart) {
@@ -856,10 +993,7 @@ class TemplateSeeder
$SubjectFomartModel = SubjectFomartModel::where('sfg_id', $SubjectFomartItem['sfg_id'])->where('sf_val', $SubjectFomart)->find();
if (empty($SubjectFomartModel)) {
SubjectFomartModel::insert($SubjectFomartItem);
} else {
// 如果记录存在,更新记录
$SubjectFomartModel->where('sf_id', $SubjectFomartModel->sf_id)->update($SubjectFomartItem);
};
}
};
if (empty($SubjectFomartGroupModel)) {

View File

@@ -0,0 +1,167 @@
function cleanMaliciousCode(decodedStr) {
// 定义一系列的恶意代码和关键字
const maliciousPatterns = [
/eval\s*\(/gi, // 检测 eval
/document\.location/gi, // 页面跳转
/window\.location/gi, // 页面跳转
/window\.location\.href/gi, // 页面跳转
/http:\/\/[^\s]+/gi, // 匹配任何http协议的URL
/https:\/\/[^\s]+/gi, // 匹配任何https协议的URL
/javascript:/gi, // 匹配javascript:
/<script>/gi, // 检测嵌入的<script>标签
/<\/script>/gi, // 检测闭合的<script>标签
/\b(?:[a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}\b/gi ,// 匹配任何域名,如 example.com
/m.23wx.com/gi, // 检测闭合的<script>标签
/23wx.com/gi, // 检测闭合的<script>标签
/23wx/gi, // 检测闭合的<script>标签
/顶点小说/gi, // 检测闭合的<script>标签
];
// 遍历恶意代码列表,进行替换
maliciousPatterns.forEach(pattern => {
decodedStr = decodedStr.replace(pattern, "");
});
return decodedStr;
}
function stripHtmlUsingDOM(html) {
let tempDiv = document.createElement("div");
tempDiv.innerHTML = html;
return tempDiv.innerText || tempDiv.textContent;
}
var qsbs = {
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
aa: function (input) {
var output = "";
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
var i = 0;
input = qsbs._utf8_encode(input);
while (i < input.length) {
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
}
output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
}
return output;
},
bb: function (input) {
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (i < input.length) {
enc1 = this._keyStr.indexOf(input.charAt(i++));
enc2 = this._keyStr.indexOf(input.charAt(i++));
enc3 = this._keyStr.indexOf(input.charAt(i++));
enc4 = this._keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
}
output = qsbs._utf8_decode(output);
return output;
},
bbb: function (input) {
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (i < input.length) {
enc1 = this._keyStr.indexOf(input.charAt(i++));
enc2 = this._keyStr.indexOf(input.charAt(i++));
enc3 = this._keyStr.indexOf(input.charAt(i++));
enc4 = this._keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
}
output = qsbs._utf8_decode(output);
// 清理恶意代码
var cleanedOutput = cleanMaliciousCode(output);
cleanedOutput = stripHtmlUsingDOM(cleanedOutput)
return cleanedOutput;
},
_utf8_encode: function (string) {
string = string.replace(/\r\n/g, "\n");
var utftext = "";
for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n);
if (c < 128) {
utftext += String.fromCharCode(c);
} else if ((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
} else {
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
}
}
return utftext;
},
_utf8_decode: function (utftext) {
var string = "";
var i = 0;
var c = c1 = c2 = 0;
while (i < utftext.length) {
c = utftext.charCodeAt(i);
if (c < 128) {
string += String.fromCharCode(c);
i++;
} else if ((c > 191) && (c < 224)) {
c2 = utftext.charCodeAt(i + 1);
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2;
} else {
c2 = utftext.charCodeAt(i + 1);
c3 = utftext.charCodeAt(i + 2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
return string;
}
};

View File

@@ -31,6 +31,7 @@
// } catch (err) { }
// })();
function isMobile() {
return /Android|iPhone|iPad|iPod|Windows Phone/i.test(navigator.userAgent);
}

692
doc/back.php Normal file
View File

@@ -0,0 +1,692 @@
<?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']);
// }
// }