diff --git a/code/app/home/config/router.php b/code/app/home/config/router.php index ccdea06..228544e 100644 --- a/code/app/home/config/router.php +++ b/code/app/home/config/router.php @@ -16,29 +16,74 @@ use think\facade\Route; */ 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]); +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]); /** - * 男生/女生 - grok 推荐最优方案 - * + * 排行榜 - 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('/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']); +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']); /** - * 书库 - grok 推荐最优方案 - * /shuku/strGender/category/status/page + * 男生 - 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', @@ -47,7 +92,50 @@ Route::get('/shuku/:strGender/:strCategory/:strStatus/page:intPage', [Novel::cla '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', @@ -56,117 +144,316 @@ Route::get('/pc/shuku/:strGender/:strCategory/:strStatus/page:intPage', [Novel:: '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]); +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+']); + ->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/books/:name-:n_id/chapter/latest', [Novel::class, 'getNovelLatestChapter']) +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+']); /** - * kan-小说详情 + * 伪小说详情-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-]+',]); + ->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-]+',]); + ->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-]+',]); /** - * 小说详情 - * /book/{strPinYin}-{intNId} - * /novel/{strPinYin}-{intNId} + * 小说详情-pc * /xiaoshuo/{strPinYin}-{intNId} - * /book-{strPinYin}-{intNId} - * /novel-{strPinYin}-{intNId} + * /novel/{strPinYin}-{intNId} + * /book/{strPinYin}-{intNId} * /xiaoshuo-{strPinYin}-{intNId} + * /novel-{strPinYin}-{intNId} + * /book-{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/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-]+',]); -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-]+',]); - +/** + * 小说详情-h5 + */ 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-]+',]); - + ->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-]+',]); + ->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]); // 小说用户中心 Route::get('/user', [User::class, 'Index'])->append(['boolIsMobile' => true]); @@ -182,7 +469,6 @@ Route::get('/history', [User::class, 'getHistory'])->append(['boolIsMobile' => t 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]); diff --git a/code/database/seeders/TemplateSeeder.php b/code/database/seeders/TemplateSeeder.php index b4bc60e..487abfe 100644 --- a/code/database/seeders/TemplateSeeder.php +++ b/code/database/seeders/TemplateSeeder.php @@ -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,37 +281,36 @@ 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}', @@ -320,21 +319,21 @@ class TemplateSeeder // 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 +341,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 +384,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 +422,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 +496,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 +533,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 +570,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 +607,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 +652,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 +689,47 @@ 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}', ] ], + // 最新id 88 + ]; + // 所有 替换模板分组 + $arrAllSubjectFomartGroupData = array_merge($arrSubjectFomartGroupData, $arrPublicSubjectFomartGroupData); + /** * 视图模板 数据播种 */ @@ -798,10 +802,9 @@ class TemplateSeeder ], ]; - self::initTemplate($arrTemplateData); - self::initSubjectFomartGroup($arrSubjectFomartGroupData); + self::initSubjectFomartGroup($arrAllSubjectFomartGroupData); self::initSite($arrSiteData); } @@ -844,8 +847,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 +859,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)) {