This commit is contained in:
Default
2025-04-01 22:16:46 +08:00
parent a3a2d72734
commit 24a9560cef
2 changed files with 53 additions and 9 deletions

View File

@@ -469,7 +469,7 @@ class Novel extends BaseController
/**
* 小说章节
* 章节详情
*
* @param Request $Request
* @param integer $intNovelId 小说id
@@ -481,6 +481,24 @@ class Novel extends BaseController
{
$boolIsMobile = $Request->param('boolIsMobile');
// 小说详情
$NovelModel = new NovelModel;
$intNId = $intNovelId;
$arrNovel = $NovelModel->getNovelInfo($intNId);
// 章节
$ChapterModel = new ChapterModel;
$arrFilter = ['n_id' => $intNId, 'c_sort_num' => $intChapterSort, 'c_page' => $intChapterPage];
$arrChapter = $ChapterModel->getChapter($arrFilter);
// 上一章节和下一章节
$arrPreChapter = $ChapterModel->getPreChapter($arrChapter['n_id'], $arrChapter['c_sort_num'], $arrChapter['c_page']);
$arrNextChapter = $ChapterModel->getNextChapter($arrChapter['n_id'], $arrChapter['c_sort_num'], $arrChapter['c_page']);
// 模拟数据
$arrNewsNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'],