This commit is contained in:
make
2025-04-19 15:28:25 +08:00
parent 6b44e134c0
commit 6343c8d142
9 changed files with 154 additions and 116 deletions

View File

@@ -218,7 +218,7 @@ class ChapterService
{
// 小说详情
$arrNovel = $this->NovelModel->getNovelByNId($intNId);
// 章节
$ChapterModel = ChapterModel::getInstance();
$arrFilter = ['n_id' => $intNId, 'c_sort_num' => $intCSortNum, 'c_page' => $intCPage];
@@ -244,7 +244,7 @@ class ChapterService
$arrChapter['pre_chapter'] = $arrPreChapter;
$arrChapter['next_chapter'] = $arrNextChapter;
// var_dump($arrChapter['c_name']);exit;
// 更新值
ConverterMovel::setVal([
'intPage' => 1,

View File

@@ -417,7 +417,7 @@ class NovelService
}
# n_category_sex_zh filter
if (!empty($strKey)) {
if (!empty($strNSex)) {
$strKey = mb_substr($strKey, 0, 30);
$arrFilter['$and'][] = [
@@ -454,10 +454,6 @@ class NovelService
$strCacheKey = '';
$intLifeTime = 0;
if (empty($arrFilter['$and'])) {
$arrFilter = [];
}
# cache filter
if ($intCacheLifeTime > 0) {
$strCacheKey = sprintf(
@@ -472,7 +468,7 @@ class NovelService
$intLifeTime = $intLifeTime;
}
$arrNovel = $this->NovelModel->findPaginatedWithCache(
$arrFilter,
$intPage,
@@ -483,7 +479,7 @@ class NovelService
);
$arrPager = call_user_func([$this, $Func], $arrParams, $arrSort, $arrNovel);
$arrResult = [
'data' => $arrNovel['data'] ?? [],
'pages' => $arrNovel['pages'] ?? 0,