This commit is contained in:
make
2025-03-28 22:02:16 +08:00
11 changed files with 277 additions and 58 deletions

View File

@@ -13,7 +13,7 @@ class Novel extends BaseController
{
public function index()
{
return View::fetch();
}
@@ -120,10 +120,10 @@ class Novel extends BaseController
}
// 书库 [:strNovelChannel]-[:intCategoryId]-[:strStatus]-[:strTextNumber]-[:strUpdateTime]-[:strSort]
public function getLibrary(Request $Request,$strNovelChannel=null,$intCategoryId=null,$strStatus=null,$strTextNumber=null,$strUpdateTime=null,$strSort=null,$intPage=1)
public function getLibrary(Request $Request, $strNovelChannel = null, $intCategoryId = null, $strStatus = null, $strTextNumber = null, $strUpdateTime = null, $strSort = null, $intPage = 1)
{
$boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据
$arrNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -147,13 +147,40 @@ class Novel extends BaseController
}
}
// 书架
public function getBookShelf(Request $Request)
{
$boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据
$arrNewsNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'],
['id' => 2, 'name' => '小说2', 'author' => '作者2'],
['id' => 3, 'name' => '小说3', 'author' => '作者3'],
['id' => 4, 'name' => '小说3', 'author' => '作者3'],
['id' => 5, 'name' => '小说3', 'author' => '作者3'],
['id' => 6, 'name' => '小说3', 'author' => '作者3'],
['id' => 7, 'name' => '小说3', 'author' => '作者3'],
['id' => 8, 'name' => '小说3', 'author' => '作者3'],
];
View::assign([
'arrNewsNovel' => $arrNewsNovel,
'strPageCode' => 'bookshelf'
]);
if ($boolIsMobile) {
return View::fetch();
} else {
return View::fetch('pc/getBookShelf');
}
}
// 男生女生频道
public function getNovelChannel(Request $Request)
{
$boolIsMobile = $Request->param('boolIsMobile');
$strNovelChannel = $Request->param('strChannel'); // 区分男生/女生频道
// 模拟数据-推荐等级为9的连载的男生频道/女生频道, 随机12个小说
$arrRecommendSerializationNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -179,8 +206,8 @@ class Novel extends BaseController
['id' => 6, 'name' => '小说3', 'author' => '作者3'],
['id' => 7, 'name' => '小说3', 'author' => '作者3'],
['id' => 8, 'name' => '小说3', 'author' => '作者3'],
];
];
// 模拟数据-最近更新-随机50
$arrNewsUpdateNovel = [
@@ -219,13 +246,13 @@ class Novel extends BaseController
return View::fetch('pc/getNovelChannel');
}
}
// 分类
public function getNovelCategory(Request $Request,$intCategoryId = null ,$intPage = 1)
{
$boolIsMobile = $Request->param('boolIsMobile');
$strChannel = $Request->param('strChannel'); // 区分男生 / 女生频道
// 模拟数据-推荐等级为9的连载的男生频道/女生频道, 随机12个小说
$arrRecommendSerializationNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -251,8 +278,8 @@ class Novel extends BaseController
['id' => 6, 'name' => '小说3', 'author' => '作者3'],
['id' => 7, 'name' => '小说3', 'author' => '作者3'],
['id' => 8, 'name' => '小说3', 'author' => '作者3'],
];
];
// 模拟数据-最近更新-随机50
$arrNewsUpdateNovel = [
@@ -293,10 +320,14 @@ class Novel extends BaseController
}
// 小说详情
public function getNovelInfo(Request $Request,$intNovelId = 1)
public function getNovelInfo(Request $Request)
{
$intNId = $Request->param('n_id');
$boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据-随机推荐数据10条
$arrRecommendNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -313,7 +344,7 @@ class Novel extends BaseController
// 相邻推荐->关联的 kan 数据
// 精品推荐->同分类随机10条数据
// 最新要点->取新意章节, 随机提取一部分内容 大概150字数
View::assign([
'arrRecommendNovel' => $arrRecommendNovel,
@@ -330,7 +361,7 @@ class Novel extends BaseController
public function getNovelChapter(Request $Request, $intNovelId = 1, $intChapterId = 1, $intChapterPage = 1)
{
$boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据
$arrNewsNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -382,13 +413,13 @@ class Novel extends BaseController
}
}
// 小说章节-搜索
public function getSearchNovel(Request $Request)
{
$boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据
$arrSearchNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -413,10 +444,10 @@ class Novel extends BaseController
}
// 小说章节-文章-自定义页面-列表
public function getArticleList(Request $Request,$intCategoryId = null ,$intPage = 1)
public function getArticleList(Request $Request, $intCategoryId = null, $intPage = 1)
{
$boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据
$arrNewsNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -441,10 +472,10 @@ class Novel extends BaseController
}
// 小说章节-文章-自定义页面-详情
public function getArticleInfo(Request $Request,$intArticleId)
public function getArticleInfo(Request $Request, $intArticleId)
{
$boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据
$arrNewsNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -467,7 +498,4 @@ class Novel extends BaseController
return View::fetch('pc/getArticleInfo');
}
}
}