debug
This commit is contained in:
@@ -7,14 +7,17 @@ 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]);
|
||||
// 加载路由配置文件(从 config 目录)
|
||||
$arrRoutes = include config_path('routes.php');
|
||||
|
||||
/**
|
||||
* 首页
|
||||
* 首页 - 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]);
|
||||
@@ -455,29 +458,77 @@ Route::get('/pc/find', [Novel::class, 'getSearchNovel'])->ext('html')->append(['
|
||||
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('/pc/bookshelf', [User::class, 'getBookShelf'])->append(['boolIsMobile' => false]);
|
||||
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/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('/article/info-:intArticleId', [Novel::class, 'getArticleInfo'])->append(['boolIsMobile' => true]);
|
||||
// Route::get('/pc/article/info-:intArticleId', [Novel::class, 'getArticleInfo'])->append(['boolIsMobile' => false]);
|
||||
|
||||
|
||||
|
||||
@@ -500,6 +551,208 @@ Route::get('/pc/article/info-:intArticleId', [Novel::class, 'getArticleInfo'])->
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 首页 - h5
|
||||
*/
|
||||
Route::get("/", [Index::class, 'index'])->ext('html')->append(['boolIsMobile' => true]);
|
||||
|
||||
/**
|
||||
* 首页 - pc
|
||||
*/
|
||||
Route::get("/pc/", [Index::class, 'getPcIndex'])->append(['boolIsMobile' => false]);
|
||||
|
||||
/**
|
||||
* 排行榜 - h5
|
||||
*/
|
||||
Route::get('/paihang/all', [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => true]);
|
||||
|
||||
/**
|
||||
* 排行榜 - pc
|
||||
*/
|
||||
Route::get("/pc/paihang/all", [Novel::class, 'getNovelRank'])->append(['boolIsMobile' => false]);
|
||||
|
||||
/**
|
||||
* 男生 - h5
|
||||
*/
|
||||
Route::get('/nansheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'boys']);
|
||||
|
||||
/**
|
||||
* 男生 - pc
|
||||
*/
|
||||
Route::get('/pc/nansheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => false, 'strChannel' => 'boys']);
|
||||
|
||||
/**
|
||||
* 女生 - h5
|
||||
*/
|
||||
Route::get('/nvsheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'girls']);
|
||||
|
||||
/**
|
||||
* 女生 - pc
|
||||
*/
|
||||
Route::get('/pc/nvsheng-xiaoshuo', [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]);
|
||||
|
||||
|
||||
/**
|
||||
* 书库 - 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]);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 书库首页-h5
|
||||
*/
|
||||
Route::get('/shuku/all', [Novel::class, 'getLibrary'])->append(['boolIsMobile' => true]);
|
||||
|
||||
|
||||
/**
|
||||
* 书库首页-pc
|
||||
*/
|
||||
Route::get('/pc/shuku/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+']);
|
||||
|
||||
/**
|
||||
* 小说章节 - 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+']);
|
||||
|
||||
|
||||
/**
|
||||
* 最新章节-特殊页面处理-pc
|
||||
*/
|
||||
Route::get('/pc/xiaoshuo/: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-]+',]);
|
||||
|
||||
|
||||
/**
|
||||
* 小说目录页面-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+']);
|
||||
|
||||
|
||||
/**
|
||||
* 小说目录页面-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+']);
|
||||
|
||||
|
||||
/**
|
||||
* 伪小说详情-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-]+',]);
|
||||
|
||||
/**
|
||||
* 伪小说详情-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-]+',]);
|
||||
|
||||
/**
|
||||
* 小说详情-pc
|
||||
*/
|
||||
Route::get('/pc/xiaoshuo/:name-:n_id', [Novel::class, 'getNovelInfo'])
|
||||
->append(['boolIsMobile' => false, '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-]+',]);
|
||||
|
||||
/**
|
||||
* 搜索小说 - h5
|
||||
*/
|
||||
Route::get('/search', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => true]);
|
||||
|
||||
/**
|
||||
* 搜索小说 - pc
|
||||
*/
|
||||
Route::get('/pc/search', [Novel::class, 'getSearchNovel'])->ext('html')->append(['boolIsMobile' => false]);
|
||||
|
||||
/**
|
||||
* 小说用户中心 - h5
|
||||
*/
|
||||
Route::get('/user', [User::class, 'Index'])->append(['boolIsMobile' => true]);
|
||||
|
||||
/**
|
||||
* 小说用户中心 - pc
|
||||
*/
|
||||
Route::get('/pc/user', [User::class, 'Index'])->append(['boolIsMobile' => false]);
|
||||
|
||||
|
||||
/**
|
||||
* 书架 - h5
|
||||
*/
|
||||
Route::get('/bookshelf', [User::class, 'getBookShelf'])->append(['boolIsMobile' => true]);
|
||||
|
||||
/**
|
||||
* 书架 - pc
|
||||
*/
|
||||
Route::get('/pc/bookshelf', [User::class, 'getBookShelf'])->append(['boolIsMobile' => false]);
|
||||
|
||||
/**
|
||||
* 历史记录 - h5
|
||||
*/
|
||||
Route::get('/history', [User::class, 'getHistory'])->append(['boolIsMobile' => true]);
|
||||
|
||||
|
||||
/**
|
||||
* 历史记录 - pc
|
||||
*/
|
||||
Route::get('/pc/history', [User::class, 'getHistory'])->append(['boolIsMobile' => false]);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user