小说页面重复率优化 降低重复率
This commit is contained in:
@@ -2,23 +2,49 @@
|
||||
|
||||
{block name="get-data"}
|
||||
{if $Request.route.intNovelId}
|
||||
{novel:info n_id="$Request.route.intNovelId" n_key="arrNovel" n_forge_id="0" /}
|
||||
{novel:info n_id="$Request.route.intNovelId" n_key="arrNovel" n_forge_id="$Request.route.intForgeId" /}
|
||||
{else}
|
||||
{novel:info n_id="$DomainModel->info_id" n_key="arrNovel" n_forge_id="0" /}
|
||||
{/if}
|
||||
{site:grm page_code="novel_info" diff="$arrNovel.n_id" num="120" g_key="arrGrm" /}
|
||||
{if empty($Request.route.intForgeId)}
|
||||
{site:grm page_code="novel_info" diff="$arrNovel.n_id" num="120" g_key="arrGrm" /}
|
||||
{else}
|
||||
{site:grm page_code="novel_info" diff="$Request.route.intForgeId" num="120" g_key="arrGrm" /}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="title"}{site:replace code="NOVEL@GETNOVELINFO@TITLE" diff="$Request.route.intNovelId" /}{/block}
|
||||
{block name="keywords"}{site:replace code="NOVEL@GETNOVELINFO@KEYWORDS" diff="$Request.route.intNovelId"}{/block}
|
||||
{block name="description"}{site:replace code="NOVEL@GETNOVELINFO@DESCRIPTION" diff="$Request.route.intNovelId"}{/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}
|
||||
{/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}
|
||||
{/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}
|
||||
{/block}
|
||||
|
||||
|
||||
{block name="head"}
|
||||
<link rel="canonical"
|
||||
href='https://{$DomainModel->d_domain}{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'>
|
||||
|
||||
<!-- 社交媒体标签 -->
|
||||
<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" />
|
||||
@@ -34,12 +60,13 @@
|
||||
<meta property="og:novel:latest_chapter_name" content="{$arrNovel.n_latest_chapter_name ?? ''}">
|
||||
<meta property="og:novel:latest_chapter_url"
|
||||
content='https://{$DomainModel->d_domain}{$strPcPath}{site:lcpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'>
|
||||
<!-- 可选:支持 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">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
@@ -71,10 +98,9 @@
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
{block name="head-css"}
|
||||
<link rel="canonical"
|
||||
href='{$DomainModel->d_domain}/{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'>
|
||||
{/block}
|
||||
|
||||
|
||||
|
||||
{block name="logo-html"}
|
||||
<h2>
|
||||
<a href="{$strPcPath}/">
|
||||
@@ -82,7 +108,13 @@
|
||||
</a>
|
||||
</h2>
|
||||
{/block}
|
||||
|
||||
{block name="strPageCode"}
|
||||
<?php $strPageCode = 'info'; ?>
|
||||
{/block}
|
||||
|
||||
{block name="main"}
|
||||
<?php $arrNovel['n_category_pinyin'] ?? $arrNovel['n_category_pinyin'] = 'all'?>
|
||||
<div class="content">
|
||||
<nav class="breadcrumb" aria-label="breadcrumb">
|
||||
<ol itemscope itemtype="https://schema.org/BreadcrumbList">
|
||||
@@ -93,19 +125,25 @@
|
||||
<meta itemprop="position" content="1" />
|
||||
</li>
|
||||
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<?php $arrNovel['n_category_pinyin'] ?? $arrNovel['n_category_pinyin'] = 'all'?>
|
||||
<a href="{$strPcPath}/shuku/all/{$arrNovel.n_category_pinyin}/all/page1" itemprop="item">
|
||||
<a href='{$strPcPath}{site:nflurl gender="all" category="$arrNovel.n_category_pinyin" status="all" page="1"/}'
|
||||
itemprop="item">
|
||||
<span itemprop="name">{$arrNovel.n_category}</span>
|
||||
</a>
|
||||
<meta itemprop="position" content="2" />
|
||||
</li>
|
||||
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<a href='{$strPcPath}{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}' itemprop="item">
|
||||
<a href='{$strPcPath}{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'
|
||||
itemprop="item">
|
||||
<span itemprop="name">{$arrNovel['n_name']}</span>
|
||||
</a>
|
||||
<meta itemprop="position" content="3" />
|
||||
</li>
|
||||
</ol>
|
||||
<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>
|
||||
{/if}
|
||||
</nav>
|
||||
|
||||
<div class="info">
|
||||
@@ -113,8 +151,9 @@
|
||||
<div class="info_L">
|
||||
<a href='{$strPcPath}{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'
|
||||
title="{$arrNovel['n_name']}" class="book_cov">
|
||||
<img src="/static/img/default.jpg" data-src="{$Novel.n_cover_path ?? ''}"
|
||||
alt="{$Novel->n_name ?? ''}封面" class="lazyload_book_cover lazyload-img">
|
||||
<img src="/static/img/default.jpg" data-src="{$arrNovel.n_cover_path ?? ''}"
|
||||
alt="{$arrNovel['n_name'] ?? ''}小说封面 - {$arrNovel.n_author}最新章节"
|
||||
class="lazyload_book_cover lazyload-img">
|
||||
<i class="serial">{$arrNovel.n_status ?? ''}</i>
|
||||
</a>
|
||||
<div class="btn">
|
||||
@@ -127,9 +166,9 @@
|
||||
</div>
|
||||
<div class="info_C book_inf">
|
||||
<div class="c01">
|
||||
<h3><a
|
||||
<h2><a
|
||||
href='{$strPcPath}{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'>{$arrNovel['n_name']}</a>
|
||||
</h3>
|
||||
</h2>
|
||||
<!-- <span id="mod_book_star">0分</span> -->
|
||||
</div>
|
||||
<p class="c02">
|
||||
@@ -140,8 +179,8 @@
|
||||
<p class="jianjie">简介</p>
|
||||
<div class="c03_box">
|
||||
<p class="jj_con" id="book_desc">
|
||||
{$arrNovel.n_description}</p>
|
||||
<span class="zk_btn" style="">展开<s></s></span>
|
||||
{$arrNovel.n_description ?? ''}</p>
|
||||
<span class="zk_btn">展开<s></s></span>
|
||||
<span class="sq_btn" style="display: none;">收起<s></s></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -149,16 +188,16 @@
|
||||
<p class="jianjie">最新要点</p>
|
||||
<div class="c03_box">
|
||||
<p class="jj_con" id="book_desc2">
|
||||
{$strFocus}</p>
|
||||
<span class="zk_btn" style="">展开<s></s></span>
|
||||
{$arrNovel.strFocus}</p>
|
||||
<span class="zk_btn">展开<s></s></span>
|
||||
<span class="sq_btn" style="display: none;">收起<s></s></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="c04">
|
||||
{if !empty($arrChapter)}
|
||||
<a href="{$strPcPath}/xiaoshuo/{$arrNovel.n_name_pinyin}-{$arrNovel.n_id}/zhang-1" class="read">立即阅读</a>
|
||||
<a href="{$strPcPath}/xiaoshuo/{$arrNovel.n_name_pinyin}-{$arrNovel.n_id}/mulu/zheng" class="mulu">目录</a>
|
||||
{/if}
|
||||
<a href='{$strPcPath}{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrNovel.intFirstChapterSort"/}'
|
||||
class="read">立即阅读</a>
|
||||
<a href='{$strPcPath}{site:nclurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" order="zheng" page="1"/}'
|
||||
class="mulu">目录</a>
|
||||
</div>
|
||||
<!-- <div class="c05">
|
||||
<p class="c05_t">作品标签:
|
||||
@@ -173,16 +212,16 @@
|
||||
<div class="inf02">
|
||||
<h4>小说信息</h4>
|
||||
<p>类别:
|
||||
<?php $arrNovel['n_category_pinyin'] ?? $arrNovel['n_category_pinyin'] = 'all'?>
|
||||
<a href='{$strPcPath}/shuku/all/{$arrNovel.n_category_pinyin}/all/page1' title="{$arrNovel.n_category}">
|
||||
<a href='{$strPcPath}{site:nflurl gender="all" category="$arrNovel.n_category_pinyin" status="all" page="1"/}'
|
||||
title="{$arrNovel.n_category}">
|
||||
{$arrNovel.n_category}
|
||||
</a>
|
||||
</p>
|
||||
<!-- <p>总字数:54.20万+</p> -->
|
||||
<p>总点击量:{$arrNovelClicks.total}</p>
|
||||
<p>月点击量:{$arrNovelClicks.monthly}</p>
|
||||
<p>周点击量:{$arrNovelClicks.weekly}</p>
|
||||
<p>日点击量:{$arrNovelClicks.daily}</p>
|
||||
<p>总点击量:{$arrNovel.arrNovelClicks.total}</p>
|
||||
<p>月点击量:{$arrNovel.arrNovelClicks.monthly}</p>
|
||||
<p>周点击量:{$arrNovel.arrNovelClicks.weekly}</p>
|
||||
<p>日点击量:{$arrNovel.arrNovelClicks.daily}</p>
|
||||
<!-- <p>收藏:0</p> -->
|
||||
</div>
|
||||
|
||||
@@ -196,27 +235,59 @@
|
||||
<h2>最新章节</h2>
|
||||
</div>
|
||||
<div class="zj_con">
|
||||
{volist name="arrChapter" id="Chapter" key="key"}
|
||||
{chapter:list count="12" sort_type="dao" n_id="$arrNovel.n_id" d_key="key" d_val="Chapter"
|
||||
cache_life="3600"}
|
||||
<p>
|
||||
<a href="{$strPcPath}/xiaoshuo/{$arrNovel.n_name_pinyin}-{$Chapter.n_id}/zhang-{$Chapter.c_sort_num}"
|
||||
class="zj">{$Chapter.c_name}</a>
|
||||
{if !empty($arrGrm[$key])}
|
||||
{$arrGrm[$key]|raw}
|
||||
{/if}
|
||||
<a href='{$strPcPath}{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$Chapter.c_sort_num" c_page="0"/}'
|
||||
title="{$arrNovel.n_name}-{$Chapter.c_name}" class="zj">{$Chapter.c_name}</a>
|
||||
<span class="time">{$Chapter.created_at ?? '1天前'}</span>
|
||||
<!-- <span class="time">3天前</span>-->
|
||||
</p>
|
||||
<p class="zw" style="max-height: 98px; overflow: hidden;"></p>
|
||||
{/volist}
|
||||
{/chapter:list}
|
||||
</div>
|
||||
</div>
|
||||
<div class="pl_tit">
|
||||
<h2>相邻推荐:</h2>
|
||||
</div>
|
||||
<div class="pl_con">
|
||||
{volist name="arrNovel.n_forge_novel" id="ForgeNovel" key="key"}
|
||||
<!-- n_forge_id -->
|
||||
<a href='{$strPcPath}/kan-xiaoshuo/{$arrNovel.n_name_pinyin}-{$arrNovel.n_id}-{$ForgeNovel.n_forge_id}'
|
||||
{php}
|
||||
$arrRandomForgeNovels = [];
|
||||
if (isset($arrNovel['n_forge_novel']) && is_array($arrNovel['n_forge_novel'])) {
|
||||
$forgeNovels = $arrNovel['n_forge_novel'];
|
||||
if (count($forgeNovels) > 10) {
|
||||
$randomKeys = array_rand($forgeNovels, 10);
|
||||
$arrRandomForgeNovels = array_intersect_key($forgeNovels, array_flip($randomKeys));
|
||||
} else {
|
||||
$arrRandomForgeNovels = $forgeNovels;
|
||||
shuffle($arrRandomForgeNovels);
|
||||
}
|
||||
$arrRandomForgeNovels = array_values($arrRandomForgeNovels);
|
||||
}
|
||||
{/php}
|
||||
|
||||
|
||||
{volist name='arrRandomForgeNovels' id='ForgeNovel' key="key"}
|
||||
{if !empty($arrGrm[$key+20])}
|
||||
{$arrGrm[$key+20]|raw}
|
||||
{/if}
|
||||
<a href='{$strPcPath}{site:nnurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" n_fid="$ForgeNovel.n_forge_id"/}'
|
||||
class="red">{$ForgeNovel.n_forge_title}</a>
|
||||
{/volist}
|
||||
|
||||
{novel:list count="30" n_category="$arrNovel.n_category_pinyin" sort_type="update" d_key="d_key"
|
||||
diff_key="$Request.route.intForgeId"
|
||||
d_val="Novel" cache_life="3600"}
|
||||
{if !empty($arrGrm[$key+80])}
|
||||
{$arrGrm[$key+80]|raw}
|
||||
{/if}
|
||||
<a href='{$strPcPath}{site:nnurl n_id="$Novel.n_id" n_py="$Novel.n_name_pinyin" n_fid="$Novel.n_id"/}'
|
||||
class="red">{$Novel.n_name}</a>
|
||||
{/novel:list}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -224,9 +295,13 @@
|
||||
<div class="fsph">
|
||||
<h4><s></s>精品推荐</h4>
|
||||
<ul class="info2_C">
|
||||
{volist name="arrRelateveNovel" id="Novel" key="key"}
|
||||
{novel:list count="30" n_category="$arrNovel.n_category_pinyin" n_status="wanjie" d_key="key"
|
||||
d_val="Novel" p_val="page_data" cache_life="3600"}
|
||||
<li>
|
||||
<h3>
|
||||
{if !empty($arrGrm[$key+10])}
|
||||
{$arrGrm[$key+10]|raw}
|
||||
{/if}
|
||||
<a href='{$strPcPath}{site:nurl n_id="$Novel.n_id" n_py="$Novel.n_name_pinyin" /}'
|
||||
title="{$Novel['n_name'] ?? ''}">
|
||||
{$Novel['n_name'] ?? ''}
|
||||
@@ -247,8 +322,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/volist}
|
||||
|
||||
{/novel:list}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -256,16 +330,17 @@
|
||||
</div>
|
||||
<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']}`,
|
||||
'c_sort_num' : 1,
|
||||
'c_name' : `第一章`,
|
||||
};
|
||||
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_update_time': `{$arrNovel['n_update_time']}`,
|
||||
'c_sort_num': 1,
|
||||
'c_name': `第一章`,
|
||||
};
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user