diff --git a/code/app/home/config/router.php b/code/app/home/config/router.php index 496d6cd..ab01bf6 100644 --- a/code/app/home/config/router.php +++ b/code/app/home/config/router.php @@ -7,21 +7,22 @@ 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("/index", [Index::class,'index'])->ext('html')->append(['boolIsMobile' => true]); -Route::get("/pc/index", [Index::class,'getPcIndex'])->ext('html')->append(['boolIsMobile' => false]); 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('bookshelf', [User::class,'getBookShelf'])->ext('html')->append(['boolIsMobile' => true]); -Route::get('/pc/bookshelf', [User::class,'getBookShelf'])->ext('html')->append(['boolIsMobile' => false]); //排行榜 -Route::get('paihang/all', [Novel::class,'getNovelRank'])->append(['boolIsMobile' => true]); +Route::get('/paihang/all', [Novel::class,'getNovelRank'])->append(['boolIsMobile' => true]); Route::get("/pc/paihang/all", [Novel::class,'getNovelRank'])->append(['boolIsMobile' => false]); /** @@ -40,79 +41,24 @@ Route::get('/pc/nvsheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append([ Route::get('/shuku/all', [Novel::class,'getLibrary'])->append(['boolIsMobile' => true]); Route::get('/pc/shuku/all', [Novel::class,'getLibrary'])->append(['boolIsMobile' => false]); Route::get('/shuku/:strNovelChannel-:strCategory-:strStatus-:intPage', [Novel::class,'getLibrary']) -->pattern([ - 'strNovelChannel' => '[\w]*', - 'strCategory' => '[\w]*', - 'strStatus' => '[\w]*', - 'intPage' => '\d+' -]) -->append(['boolIsMobile' => true]); + ->pattern([ + 'strNovelChannel' => '[\w]*', + 'strCategory' => '[\w]*', + 'strStatus' => '[\w]*', + 'intPage' => '\d+' + ]) + ->append(['boolIsMobile' => true]); + Route::get('/pc/shuku/:strNovelChannel-:strCategory-:strStatus-:intPage', [Novel::class,'getLibrary']) -->pattern([ - 'strNovelChannel' => '[\w]*', - 'strCategory' => '[\w]*', - 'strStatus' => '[\w]*', - 'intPage' => '\d+' -]) -->append(['boolIsMobile' => false]); + ->pattern([ + 'strNovelChannel' => '[\w]*', + 'strCategory' => '[\w]*', + 'strStatus' => '[\w]*', + 'intPage' => '\d+' + ]) + ->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/append(['boolIsMobile' => false]) -// ->pattern(['intCategoryId' => '\d+','intPage' => '\d+',]) -// ->ext('html'); - - -// 文章 列表 -Route::get('/article/list-[:intCategoryId]-[:intPage]', [Novel::class,'getArticleList'])->ext('html')->append(['boolIsMobile' => true]); -Route::get('/pc/article/list-[:intCategoryId]-[:intPage]', [Novel::class,'getArticleList'])->ext('html')->append(['boolIsMobile' => false]); -Route::get('/article/list', [Novel::class,'getArticleList'])->ext('html')->append(['boolIsMobile' => true]); -Route::get('/pc/article/list', [Novel::class,'getArticleList'])->ext('html')->append(['boolIsMobile' => false]); - -// 文章 详情 -Route::get('/article/info-:intArticleId', [Novel::class,'getArticleInfo'])->ext('html')->append(['boolIsMobile' => true]); -Route::get('/pc/article/info-:intArticleId', [Novel::class,'getArticleInfo'])->ext('html')->append(['boolIsMobile' => false]); - -/** - * 小说详情 - * /book/{strPinYin}-{intNId}.html - * /novel/{strPinYin}-{intNId}.html - * /novel-{strPinYin}-{intNId}.html - * /book-{strPinYin}-{intNId}.html - */ -Route::get('/pc/book/:name-:n_id', [Novel::class, 'getNovelInfo']) - ->append(['boolIsMobile' => false, 'intUriType' => 1]) - ->pattern(['n_id' => '\d+','name' => '[\w-]+',]) - ->ext('html'); - -Route::get('/pc/novel/:name-:n_id', [Novel::class, 'getNovelInfo']) - ->append(['boolIsMobile' => false, 'intUriType' => 2]) - ->pattern(['n_id' => '\d+','name' => '[\w-]+',]) - ->ext('html'); - -Route::get('/pc/novel-:name-:n_id', [Novel::class, 'getNovelInfo']) - ->append(['boolIsMobile' => false, 'intUriType' => 3]) - ->pattern(['n_id' => '\d+','name' => '[\w-]+',]) - ->ext('html'); - -Route::get('/pc/book-:name-:n_id', [Novel::class, 'getNovelInfo']) - ->append(['boolIsMobile' => false, 'intUriType' => 4]) - ->pattern(['n_id' => '\d+','name' => '[\w-]+',]) - ->ext('html'); - -// 最新章节-特殊页面处理 -Route::get('/pc/books/:name-:n_id/chapter/latest', [Novel::class, 'getNovelNewsChapter']) - ->append(['boolIsMobile' => false, 'intUriType' => 1]) - ->pattern(['n_id' => '\d+','name' => '[\w-]+',]) - ->ext('html'); - /** * 小说章节 * /xiaoshuo/小说拼音-小说id/zhang-章节排序/章节分页 @@ -126,6 +72,13 @@ Route::get('/pc/xiaoshuo/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPag ->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, 'getNovelNewsChapter']) + ->append(['boolIsMobile' => false, 'intUriType' => 1]) + ->pattern(['n_id' => '\d+','name' => '[\w-]+',]); + /** * 小说目录页面 @@ -139,24 +92,84 @@ Route::get('/pc/xiaoshuo/:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::c ->append(['boolIsMobile' => false, 'intUriType' => 1]) ->pattern(['intNovelId' => '\d+','name' => '[\w-]+','strOrder' => 'zheng|dao','intPage' => '\d+']); +/** + * 小说详情 + * /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-]+',]); + + // 搜索小说 -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('/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'])->ext('html')->append(['boolIsMobile' => true]); -Route::get('/pc/user', [User::class,'Index'])->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'])->ext('html')->append(['boolIsMobile' => true]); -Route::get('/pc/history', [User::class,'getHistory'])->ext('html')->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/append(['boolIsMobile' => false]) +// ->pattern(['intCategoryId' => '\d+','intPage' => '\d+',]) +// ->ext('html'); diff --git a/code/app/home/view/kuangyu/Pc/Public/chapterTableAll.html b/code/app/home/view/kuangyu/Pc/Public/chapterTableAll.html index 2fc1fc2..8cba263 100644 --- a/code/app/home/view/kuangyu/Pc/Public/chapterTableAll.html +++ b/code/app/home/view/kuangyu/Pc/Public/chapterTableAll.html @@ -1,6 +1,6 @@
  • - 01 天龙问世 + 01 天龙问世
  • - 02 沧武的小霸王 + 02 沧武的小霸王
  • \ No newline at end of file diff --git a/code/app/home/view/kuangyu/Pc/getLibrary.html b/code/app/home/view/kuangyu/Pc/getLibrary.html index 83abcdc..309c196 100644 --- a/code/app/home/view/kuangyu/Pc/getLibrary.html +++ b/code/app/home/view/kuangyu/Pc/getLibrary.html @@ -6,6 +6,22 @@ {block name="main"}
    + +
    @@ -57,9 +73,9 @@
  • 7
  • 8
  • ...
  • -
  • 33
  • -
  • 34
  • -
  • »
  • +
  • 33
  • +
  • 34
  • +
  • »
  • diff --git a/code/app/home/view/kuangyu/Pc/getNovelChannel.html b/code/app/home/view/kuangyu/Pc/getNovelChannel.html index 51f886b..6b5b831 100644 --- a/code/app/home/view/kuangyu/Pc/getNovelChannel.html +++ b/code/app/home/view/kuangyu/Pc/getNovelChannel.html @@ -16,8 +16,33 @@ {block name="main"} + +
    + +
    diff --git a/code/app/home/view/kuangyu/Pc/getNovelChapter.html b/code/app/home/view/kuangyu/Pc/getNovelChapter.html index bd81280..f9a7ed4 100644 --- a/code/app/home/view/kuangyu/Pc/getNovelChapter.html +++ b/code/app/home/view/kuangyu/Pc/getNovelChapter.html @@ -10,7 +10,7 @@ - +
    @@ -20,7 +20,7 @@
    @@ -63,39 +63,39 @@ 快速导航