fix chapter page
This commit is contained in:
@@ -604,7 +604,32 @@ class Novel extends BaseController
|
||||
|
||||
$ChapterModel = new ChapterModel;
|
||||
|
||||
$strKey = sprintf('Nid:%s:Chapter-Page:%s:Order:%s', $intNId, $intPage, $strOrder);
|
||||
|
||||
$arrFilter = ['n_id' => $intNId, 'c_page' => 0,];
|
||||
$intLimit = 100;
|
||||
$intLifeTime = 12 * 3600;
|
||||
|
||||
if ($strOrder == 'zheng') {
|
||||
$arrSort = ['c_sort_num' => 1];
|
||||
} else {
|
||||
$arrSort = ['c_sort_num' => -1];
|
||||
}
|
||||
|
||||
$arrPage = $ChapterModel->getCommonNovelPageOnCache($strKey, $arrFilter, $intPage, $intLimit, $intLifeTime, $arrSort);
|
||||
|
||||
$intButtomNum = 5;
|
||||
if ($boolIsMobile == false) {
|
||||
$intButtomNum = 10;
|
||||
|
||||
}
|
||||
|
||||
$strBaseUrl = sprintf('/pc/xiaoshuo/%s-%s/mulu/%s/{page}', $arrNovel['og_novel_pin_yin'], $intNId, $strOrder);
|
||||
$arrPaginator = CusteomPage02::generate($intPage, $arrPage['total'], $intLimit, $strBaseUrl, $intButtomNum);
|
||||
|
||||
// echo '<pre>';
|
||||
// print_r($arrPaginator);
|
||||
// exit;
|
||||
// 章节目录
|
||||
$arrChapter = [
|
||||
['c_sort_num' => 1, 'name' => '第1章', 'created_at' => '作者1'],
|
||||
@@ -614,7 +639,6 @@ class Novel extends BaseController
|
||||
['c_sort_num' => 1, 'name' => '第5章', 'created_at' => '作者1'],
|
||||
['c_sort_num' => 1, 'name' => '第6章', 'created_at' => '作者1'],
|
||||
|
||||
|
||||
];
|
||||
|
||||
View::assign([
|
||||
|
||||
Reference in New Issue
Block a user