使用 grok 检测优化h5 的 html

This commit is contained in:
make
2025-04-10 11:54:34 +08:00
parent fb2a5a30f8
commit 2e9e914f77
9 changed files with 94 additions and 73 deletions

View File

@@ -665,6 +665,7 @@ class Novel extends BaseController
$arrFilter = ['n_id' => $intNId, 'c_sort_num' => $intChapterSort, 'c_page' => $intChapterPage];
$arrChapter = $ChapterModel->findOne($arrFilter);
$strChapterDescription = '';
// 上一章节和下一章节
$arrPreChapter = $arrNextChapter = [];
@@ -672,10 +673,17 @@ class Novel extends BaseController
if ($arrChapter) {
$arrPreChapter = $ChapterModel->getPreChapter($arrChapter['n_id'], $arrChapter['c_sort_num'], $arrChapter['c_page']);
$arrNextChapter = $ChapterModel->getNextChapter($arrChapter['n_id'], $arrChapter['c_sort_num'], $arrChapter['c_page']);
// 要点-先从章节随机截取后面如果用上ai看看使用ai 提炼 精简内容
$strChapterDescription = strip_tags($arrChapter['content']);
$intCount = mb_strlen($strChapterDescription);
$strChapterDescription = ($intCount > 50) ? mb_substr($strChapterDescription, 0, 50) : $strChapterDescription;
}
$arrCategoryAll = CategoryModel::$arrCategoryAll;
// 更新值
ConverterMovel::setVal([
'intPage' => 1,
@@ -684,6 +692,7 @@ class Novel extends BaseController
'strNovelCategoryName' => $arrNovel['og_novel_category'],
'strNovelStatus' => $arrNovel['og_novel_status'],
'strNovelDescription' => $arrNovel['og_description'],
'strChapterDescription' => $strChapterDescription,
'strNovelChapterName' => $arrChapter['name'],
'strNovelChapterSort' => $arrChapter['c_sort_num'],
]);