修改小说伪造小说详情页面 取消伪造列表随机

This commit is contained in:
make
2025-07-31 02:02:32 +08:00
parent 95dd6cea8a
commit f115c7f480
17 changed files with 3003 additions and 240 deletions

View File

@@ -14,27 +14,27 @@
{/block}
{block name="title"}
{if $DomainModel->info_id == $Request.route.intNovelId || empty($Request.route.intNovelId)}
{site:replace code="INDEX@INDEX@TITLE"}
{else}
{site:replace code="NOVEL@GETNOVELINFO@TITLE" diff="$Request.route.intNovelId" /}
{/if}
{if $DomainModel->info_id == $Request.route.intNovelId || empty($Request.route.intNovelId)}
{site:replace code="INDEX@INDEX@TITLE"}
{else}
{site:replace code="NOVEL@GETNOVELINFO@TITLE" diff="$Request.route.intNovelId" /}
{/if}
{/block}
{block name="keywords"}
{if $DomainModel->info_id == $Request.route.intNovelId || empty($Request.route.intNovelId)}
{site:replace code="INDEX@INDEX@KEYWORDS"}
{else}
{site:replace code="NOVEL@GETNOVELINFO@KEYWORDS" diff="$Request.route.intNovelId"}
{/if}
{if $DomainModel->info_id == $Request.route.intNovelId || empty($Request.route.intNovelId)}
{site:replace code="INDEX@INDEX@KEYWORDS"}
{else}
{site:replace code="NOVEL@GETNOVELINFO@KEYWORDS" diff="$Request.route.intNovelId"}
{/if}
{/block}
{block name="description"}
{if $DomainModel->info_id == $Request.route.intNovelId || empty($Request.route.intNovelId)}
{site:replace code="INDEX@INDEX@DESCRIPTION"}
{else}
{site:replace code="NOVEL@GETNOVELINFO@DESCRIPTION" diff="$Request.route.intNovelId"}
{/if}
{if $DomainModel->info_id == $Request.route.intNovelId || empty($Request.route.intNovelId)}
{site:replace code="INDEX@INDEX@DESCRIPTION"}
{else}
{site:replace code="NOVEL@GETNOVELINFO@DESCRIPTION" diff="$Request.route.intNovelId"}
{/if}
{/block}
{block name="head"}
@@ -46,7 +46,8 @@
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$arrNovel['n_name']??'未知小说'}" />
<meta property="og:description" content='{site:replace code="NOVEL@GETNOVELINFO@DESCRIPTION" diff="$Request.route.intNovelId"}' />
<meta property="og:description"
content='{site:replace code="NOVEL@GETNOVELINFO@DESCRIPTION" diff="$Request.route.intNovelId"}' />
<meta property="og:url"
content='https://{$DomainModel->d_domain}{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}' />
<meta property="og:type" content="book" />
@@ -65,7 +66,8 @@
<!-- 可选:支持 Twitter Card -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="{$arrNovel['n_name'] ?? '未知小说'}" />
<meta name="twitter:description" content='{site:replace code="NOVEL@GETNOVELINFO@DESCRIPTION" diff="$Request.route.intNovelId"}' />
<meta name="twitter:description"
content='{site:replace code="NOVEL@GETNOVELINFO@DESCRIPTION" diff="$Request.route.intNovelId"}' />
<meta name="twitter:image" content="{$arrNovel.n_cover_path ?? ''}" />
<!-- 结构化数据 -->
<script type="application/ld+json">
@@ -131,7 +133,7 @@
{block name="main"}
<h1 class="site-description ">{$arrNovel['n_name']}最新章节 - {$arrNovel['n_author']} - {$DomainModel->d_name}</h1>
{if $DomainModel->info_id == $Request.route.intNovelId || empty($Request.route.intNovelId)}
<h4 class="site-description ">{$DomainModel->d_index_description}</h4>
<h4 class="site-description ">{$DomainModel->d_index_description}</h4>
{/if}
<nav class="breadcrumb" aria-label="breadcrumb">
<ol itemscope itemtype="https://schema.org/BreadcrumbList">
@@ -160,7 +162,7 @@
<div class="detail">
<img rc="/static/img/default.jpg" data-src="{$arrNovel.n_cover_path ?? ''}"
alt="{$arrNovel['n_name'] ?? ''}小说封面 - {$arrNovel.n_author}最新章节" class="lazy lazyload-img">
alt="{$arrNovel['n_name'] ?? ''}小说封面 - {$arrNovel.n_author}最新章节" class="lazy lazyload-img">
<p class="name">
<strong>{$arrNovel.n_name}</strong>
</p>
@@ -180,7 +182,8 @@
</div>
<ul class="action">
<li>
<a href='{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrNovel.intFirstChapterSort"/}'>开始阅读</a>
<a
href='{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrNovel.intFirstChapterSort"/}'>开始阅读</a>
</li>
<li>
<a href='{site:nclurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" order="zheng" page="1"/}'>章节目录</a>
@@ -192,7 +195,7 @@
<div class="box">
<div class="title">{$arrNovel.n_name}小说简介</div>
<div class="intro">
<p>{$arrNovel.n_description ?? ''}
<p>{$arrNovel.n_description ?? ''}
</p>
</div>
</div>
@@ -210,13 +213,13 @@
{chapter:list count="10" sort_type="dao" n_id="$arrNovel.n_id" d_key="d_key" d_val="Chapter" cache_life="3600"}
<li>
{if !empty($arrGrm[$d_key])}
{$arrGrm[$d_key]|raw}
{$arrGrm[$d_key]|raw}
{/if}
<a
href='{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$Chapter.c_sort_num" c_page="0"/}'>{$Chapter.c_name}<span></span></a>
</li>
{/chapter:list}
</ul>
<div class="title">{$arrNovel.n_name} 章节列表第1页/100章</div>
<ul class="vlist">
@@ -224,9 +227,9 @@
cache_life="3600"}
<li>
{if !empty($arrGrm[$d_key+10])}
{$arrGrm[$d_key+10]|raw}
{$arrGrm[$d_key+10]|raw}
{/if}
<a
href='{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$Chapter.c_sort_num" c_page="0"/}'>{$Chapter.c_name}<span></span></a>
</li>
@@ -239,26 +242,14 @@
{volist name='$arrNovel.arrRelateveNovel' id='Novel'}
<a href='{site:nurl n_id="$Novel.n_id" n_py="$Novel.n_name_pinyin" /}'>{$Novel.n_name} </a>&nbsp;&nbsp;
{/volist}
</div>
</div>
<div class="tui">
<div class="listtop">
<b>书友推荐:</b>
{php}
$arrRandomForgeNovels = [];
if (isset($arrNovel['n_forge_novel']) && is_array($arrNovel['n_forge_novel'])) {
$forgeNovels = $arrNovel['n_forge_novel'];
$count = count($forgeNovels);
if ($count > 0) {
$randomKeys = array_rand($forgeNovels, min(10, $count));
foreach ((array) $randomKeys as $key) {
$arrRandomForgeNovels[] = $forgeNovels[$key];
}
}
}
{/php}
{volist name='arrRandomForgeNovels' id='ForgeNovel' key="key"}
{volist name='arrNovel.n_forge_novel' id='ForgeNovel' key="key"}
<a
href='{site:nnurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" n_fid="$ForgeNovel.n_forge_id"/}'>{$ForgeNovel.n_forge_title}</a>&nbsp;&nbsp;
{/volist}
@@ -277,17 +268,17 @@
<script>
const strNovelId = `{$arrNovel.n_id}`;
const arrNovel = {
'n_id' : `{$arrNovel['n_id']}`,
'n_name_pinyin' : `{$arrNovel['n_name_pinyin']}`,
'n_cover_path' : `{$arrNovel['n_cover_path']}`,
'n_name' : `{$arrNovel['n_name']}`,
'n_author' : `{$arrNovel['n_author']}`,
'n_status' : `{$arrNovel['n_status']}`,
'n_description' : `{$arrNovel['n_description']}`,
'n_latest_chapter_name' : `{$arrNovel['n_latest_chapter_name']}`,
'n_update_time' : `{$arrNovel['n_update_time']}`,
'c_sort_num' : 1,
'c_name' : `第一章`,
'n_id': `{$arrNovel['n_id']}`,
'n_name_pinyin': `{$arrNovel['n_name_pinyin']}`,
'n_cover_path': `{$arrNovel['n_cover_path']}`,
'n_name': `{$arrNovel['n_name']}`,
'n_author': `{$arrNovel['n_author']}`,
'n_status': `{$arrNovel['n_status']}`,
'n_description': `{$arrNovel['n_description']}`,
'n_latest_chapter_name': `{$arrNovel['n_latest_chapter_name']}`,
'n_update_time': `{$arrNovel['n_update_time']}`,
'c_sort_num': 1,
'c_name': `第一章`,
};
</script>
{/block}