fix no chapter page error

This commit is contained in:
Default
2025-04-03 17:30:41 +08:00
parent 6e4060ef4f
commit efbbfc3e0f

View File

@@ -553,8 +553,13 @@ class Novel extends BaseController
$arrChapter = $ChapterModel->getChapter($arrFilter);
// 上一章节和下一章节
$arrPreChapter = $arrNextChapter = [];
if ($arrChapter) {
$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']);
}
$arrCategoryAll = CategoryModel::$arrCategoryAll;
@@ -613,7 +618,6 @@ class Novel extends BaseController
$intButtomNum = 5;
if ($boolIsMobile == false) {
$intButtomNum = 10;
}
$strBaseUrl = sprintf('/pc/xiaoshuo/%s-%s/mulu/%s/{page}', $arrNovel['og_novel_pin_yin'], $intNId, $strOrder);