This commit is contained in:
make
2025-04-12 18:20:35 +08:00
parent 1d431ecce5
commit 760fe47b5e
40 changed files with 751 additions and 338 deletions

View File

@@ -103,6 +103,7 @@ class Novel extends BaseController
public function getLibrary(Request $Request, $strGender = 'all', $strCategory = 'all', $strStatus = 'all', $intPage = 1)
{
$boolIsMobile = $Request->param('boolIsMobile');
$strChannel = $Request->param('strChannel') ?? 'all';
// 性别
@@ -198,6 +199,7 @@ class Novel extends BaseController
'strSearchCategory' => $strSearchCategory,
'strSearchStatus' => $strSearchStatus,
'strNovelSex' => $arrSexChinese[$strGender],
'strChannel' => $strChannel,
'strTitle' => $strTitle,
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
@@ -487,6 +489,13 @@ class Novel extends BaseController
$ChapterModel = ChapterModel::getInstance();
$arrLatestChapter = $ChapterModel->getLatestChapterByNId($intNId);
// 第一章
$arrFirstChapter = $ChapterModel->getFirstChapterByNId($intNId,false);
$intFirstChapterSort = null;
if ($arrFirstChapter) {
$intFirstChapterSort = $arrFirstChapter['c_sort_num'];
}
$strFocus = '';
// 要点
if ($arrLatestChapter) {
@@ -514,7 +523,7 @@ class Novel extends BaseController
$arrRelateveNovel = $NovelModel->findMany(['n_id' => [
'$in' => $arrRelateveNId,
]], 10);
// 更新值
ConverterMovel::setVal([
'intPage' => 1,
@@ -541,6 +550,7 @@ class Novel extends BaseController
'arrLatestChapter' => $arrLatestChapter,
'arrNovelClicks' => $arrNovelClicks,
'strFocus' => $strFocus,
'intFirstChapterSort' => $intFirstChapterSort,
'strPageCode' => 'boy',
'strTitle' => $strTitle,
'strKeywords' => $strKeywords,
@@ -724,7 +734,7 @@ class Novel extends BaseController
* @param string $strOrder 正序倒叙:zheng/dao
* @return void
*/
public function getNovelChapterAll(Request $Request, $intNovelId = null, $intPage = 1, $strOrder = 'zheng')
public function getNovelCatalog(Request $Request, $intNovelId = null, $intPage = 1, $strOrder = 'zheng')
{
$boolIsMobile = $Request->param('boolIsMobile');
@@ -795,7 +805,7 @@ class Novel extends BaseController
$strView = '';
$this->generateGrm(1, $intNId . '-' . $strOrder . '-' . $intPage, 110);
} else {
$strView = 'pc/getNovelChapterAll';
$strView = 'pc/getNovelCatalog';
$this->generateGrm(2, $intNId . '-' . $strOrder . '-' . $intPage, 110);
}
@@ -837,9 +847,11 @@ class Novel extends BaseController
$intButtomNum = 10;
$strBaseUrl = sprintf('/search.html?keyword=%s&page={page}', $strSearchKeywords);
// $strSearchInfoUrlTemp = $Request->DomainModel->getFomartSubject('SEARCH_INFO_URL','',false);
// $strBaseUrl = sprintf('/search.html?keyword=%s&page={page}', $strSearchKeywords);
$strBaseUrl = NovelModel::getNovelSearchUrl($strSearchKeywords,'{page}');
$arrPaginator = CusteomPage02::generate($intPage, $arrPage['total'], $intLimit, $strBaseUrl, $intButtomNum);
// 更新值
ConverterMovel::setVal([
'intPage' => $intPage,