Merge branch 'dev' of ssh://git.bgbg.live:18150/root/SEONexus into dev

This commit is contained in:
make
2025-04-08 11:38:24 +08:00
28 changed files with 776 additions and 137 deletions

View File

@@ -62,8 +62,6 @@ abstract class BaseController
*/
protected function initialize()
{
// TODO 因为视图无法渲染 request 暂时使用这个
View::assign("DomainModel", $this->request->DomainModel);
$this->initSiteTKD();
}

View File

@@ -82,11 +82,11 @@ class Novel extends BaseController
'strDescription' => $strDescription,
'strPageCode' => 'rank'
]);
if ($boolIsMobile) {
return View::fetch();
} else {
return View::fetch('pc/getNovelRank');
}
$strView = $boolIsMobile ? '' : 'pc/getNovelRank';
return $this->rending($strView);
}
/**
@@ -170,8 +170,8 @@ class Novel extends BaseController
// 更新值
ConverterMovel::setVal([
'intPage' => $intPage,
'strNovelSex' => $arrSexChinese[$strGender],
'strNovelCategoryName' => str_replace("小说", "", $strSearchCategory),
'strNovelSex' => $arrSexChinese[$strGender],
'strNovelCategoryName' => str_replace("小说", "", $strSearchCategory),
'strNovelStatus' => $strSearchStatus,
]);
@@ -199,8 +199,7 @@ class Novel extends BaseController
'strDescription' => $strDescription,
]);
return View::fetch($strTemplate);
return $this->rending($strTemplate);
}
/**
@@ -262,11 +261,11 @@ class Novel extends BaseController
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
return View::fetch();
} else {
return View::fetch('pc/getNovelChannel');
}
$strView = $boolIsMobile ? '' : 'pc/getNovelChannel';
return $this->rending($strView);
}
/**
@@ -358,14 +357,13 @@ class Novel extends BaseController
*/
public function getKanNovelInfo(Request $Request)
{
// TODO 这个页面数据没有处理
// FIXED 不要这样打标记好不好,沟通成本太高了,你直接标注缺少什么数据,什么数据有问题,什么数据需要转换
// TODO 这个是 kan 小说页面的控制器,是直接复制 小说详情的控制器,
// 1.从这个页面上看,这个应该展示 kan 小说的名字才对,目前 title 还是 小说的名字
// $arrNovel['og_novel_book_name'] = kan 小说 的 名字
$intNId = $Request->param('n_id');
$intForgeId = $Request->param('n_forge_id');
$boolIsMobile = $Request->param('boolIsMobile');
$NovelModel = new NovelModel;
@@ -373,6 +371,13 @@ class Novel extends BaseController
// 小说详情
$arrNovel = $NovelModel->getNovelByNId($intNId);
foreach ($arrNovel['n_forge_novel'] as $arrForgeNovel) {
if ($arrForgeNovel['n_forge_id'] == $intForgeId) {
$arrNovel['og_novel_book_name'] = $arrForgeNovel['n_forge_title'];
break;
}
}
// 分品拼音
$arrNovel['category_pinyin'] = CategoryModel::getPinYinByZh($arrNovel['og_novel_category']);
@@ -414,7 +419,7 @@ class Novel extends BaseController
'strNovelName' => $arrNovel['og_novel_book_name'],
'strNovelAuthor' => $arrNovel['og_novel_author'],
'strNovelCategoryName' => $arrNovel['og_novel_category'],
'strNovelSex' => $arrNovel['category_sex'] == 'man' ? '男生' : '女生',
'strNovelSex' => $arrNovel['category_sex'] == 'man' ? '男生' : '女生',
'strNovelStatus' => $arrNovel['og_novel_status'],
'strNovelDescription' => $arrNovel['n_page_description'],
]);
@@ -444,13 +449,11 @@ class Novel extends BaseController
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
return View::fetch('getNovelInfo');
} else {
return View::fetch('pc/getNovelInfo');
}
$strView = $boolIsMobile ? 'getNovelInfo' : 'pc/getNovelInfo';
return $this->rending($strView);
}
/**
@@ -511,7 +514,7 @@ class Novel extends BaseController
'strNovelName' => $arrNovel['og_novel_book_name'],
'strNovelAuthor' => $arrNovel['og_novel_author'],
'strNovelCategoryName' => $arrNovel['og_novel_category'],
'strNovelSex' => $arrNovel['category_sex'] == 'man' ? '男生' : '女生',
'strNovelSex' => $arrNovel['category_sex'] == 'man' ? '男生' : '女生',
'strNovelStatus' => $arrNovel['og_novel_status'],
'strNovelDescription' => $arrNovel['n_page_description'],
]);
@@ -536,11 +539,10 @@ class Novel extends BaseController
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
return View::fetch();
} else {
return View::fetch('pc/getNovelInfo');
}
$strView = $boolIsMobile ? '' : 'pc/getNovelInfo';
return $this->rending($strView);
}
/**
@@ -626,11 +628,10 @@ class Novel extends BaseController
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
return View::fetch('getNovelChapter');
} else {
return View::fetch('pc/getNovelChapter');
}
$strView = $boolIsMobile ? 'getNovelChapter' : 'pc/getNovelChapter';
return $this->rending($strView);
}
@@ -702,11 +703,10 @@ class Novel extends BaseController
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
return View::fetch();
} else {
return View::fetch('pc/getNovelChapter');
}
$strView = $boolIsMobile ? '' : 'pc/getNovelChapter';
return $this->rending($strView);
}
/**
@@ -754,7 +754,7 @@ class Novel extends BaseController
// 更新值
ConverterMovel::setVal([
'intPage' => $intPage,
'strNovelSex' => $arrNovel['category_sex'] == 'man' ? '男生' : '女生',
'strNovelSex' => $arrNovel['category_sex'] == 'man' ? '男生' : '女生',
'strNovelName' => $arrNovel['og_novel_book_name'],
'strNovelAuthor' => $arrNovel['og_novel_author'],
'strNovelCategoryName' => $arrNovel['og_novel_category'],
@@ -783,11 +783,11 @@ class Novel extends BaseController
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
return View::fetch();
} else {
return View::fetch('pc/getNovelChapterAll');
}
$strView = $boolIsMobile ? '' : 'pc/getNovelChapterAll';
return $this->rending($strView);
}
/**
@@ -832,9 +832,7 @@ class Novel extends BaseController
ConverterMovel::setVal([
'intPage' => $intPage,
'strSearchKeywords' => $strSearchKeywords,
// FIXED 如果不知道怎么做,就不要用这个模板,你现在太过依赖这个模板,这个模板如果是一个刚毕业的大学生的垃圾论文项目,你也被他的四维锁死?
// 这个和模板没有关系, 昨天 grok 使用超限制了使用you.com 提供的 tkd 设计,它设计的 tkd模板 需要的 字段比较多,那几个 性别 和 分类 放在搜索是不太合理
// 现在改了使用grok 设计的 ai 记录在 app/home/view/kuangyu/推广SEO过程设计记录/TKD/搜索页Tkd.md
]);
$strTitleTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@TITLE');
@@ -857,11 +855,9 @@ class Novel extends BaseController
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
return View::fetch();
} else {
return View::fetch('pc/getSearchNovel');
}
$strView = $boolIsMobile ? '' : 'pc/getSearchNovel';
return $this->rending($strView);
}
/**

View File

@@ -91,14 +91,8 @@
<!-- 现在是使用这个 -->
{$DomainModel->d_statis|raw}
{:request()->DomainModel->d_statis}
<!-- FIXED 打开TP模板文档找到变量原样输出 -->
<!-- TODO 问题描述:下面 -->
<!-- 我这边测试: 无法调用用 Request 渲染 只能渲染 通过 view:assign() 传递过来的变量 START-->
<!-- 1.{Request->DomainModel->d_statis|raw} 这个在页面上展示的 就是: {Request->DomainModel->d_statis} -->
<!-- 2.{$DomainModel->d_statis|raw} 使用这个是可以正常渲染的这个在basecontroll 里面 加入 assign了你看看这样操作行不-->
<!-- TODO END -->
{:request()->DomainModel->d_domian}
</body>
</html>