This commit is contained in:
Default
2025-04-17 17:29:51 +08:00
parent efad19295d
commit 1f8c738381
16 changed files with 466 additions and 215 deletions

View File

@@ -7,6 +7,11 @@ use app\home\controller\Novel;
use app\home\controller\User;
use think\facade\Route;
Route::get('article/fenlei/:category', function (\think\Request $Request) {
return view('test/test01/index.html');
});
/**
* 路由配置文件
*/
@@ -103,7 +108,7 @@ $arrRoutes = [
'history' => ['/history', '/reading-history', '/read-record', '/lishi', '/yuedu-lishi', '/browse-past'],
// 首页
'index' => ['/'],
],
];
@@ -196,7 +201,7 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
// 首页
if ($platform == 'h5') {
Route::get($strRoute, [Index::class, 'index'])->append(['boolIsMobile' => $boolIsMobile]);
}else{
} else {
Route::get($strRoute, [Index::class, 'getPcIndex'])->append(['boolIsMobile' => $boolIsMobile]);
}
break;

View File

@@ -1,5 +1,5 @@
<?php
use app\model\AutoSwitchViewModel;
use app\services\SiteContext;
return AutoSwitchViewModel::getViewConfig();
return app(SiteContext::class)->getViewConfig();

View File

@@ -60,6 +60,10 @@ class Index extends BaseController
$strKey = sprintf('%s:H5:INDEX:RANK:%s:%s', $Request->DomainModel->d_domain, 'total', 'finished');
$arrEndNovelRankNovel = $NovelModel->getRankNovelOnCache($strKey, 10, 0, 'total', $strStatus);
/** @var DomainModel **/
$Request->DomainModel;
$strHostNovelDescriptionTemplate = $Request->DomainModel->getFomartSubject('INDEX_POPULAR_NOVELS');
$strNewsNovelDescriptionTemplate = $Request->DomainModel->getFomartSubject('INDEX_NEWS_NOVELS');
$strRankNovelDescriptionTemplate = $Request->DomainModel->getFomartSubject('INDEX_RANK_NOVELS');

View File

@@ -12,6 +12,7 @@ use app\model\NovelClicksModel;
use app\model\NovelModel;
use think\facade\View;
use app\Request;
use app\services\NovelService;
use template\page\CusteomPage02;
class Novel extends BaseController
@@ -204,7 +205,7 @@ class Novel extends BaseController
$strTemplate = 'pc/getLibrary';
}
$strBaseUrl = NovelModel::getNovelCategoryUrl($strGender, $strCategory, $strStatus, '{page}');
$strBaseUrl = app(NovelService::class)->getNovelCategoryUrl($strGender, $strCategory, $strStatus, '{page}');
$arrPaginator = CusteomPage02::generate($intPage, $arrPage['total'], $intLimit, $strBaseUrl, $intButtomNum);
// 更新值
@@ -911,7 +912,7 @@ class Novel extends BaseController
// $strSearchInfoUrlTemp = $Request->DomainModel->getFomartSubject('SEARCH_INFO_URL','',false);
// $strBaseUrl = sprintf('/search.html?keyword=%s&page={page}', $strSearchKeywords);
$strBaseUrl = NovelModel::getNovelSearchUrl($strSearchKeywords, '{page}');
$strBaseUrl = app(NovelService::class)->getNovelSearchUrl($strSearchKeywords, '{page}');
$arrPaginator = CusteomPage02::generate($intPage, $arrPage['total'], $intLimit, $strBaseUrl, $intButtomNum);
// 更新值