debug
This commit is contained in:
@@ -160,21 +160,37 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
|
|||||||
switch ($key) {
|
switch ($key) {
|
||||||
case 'latest':
|
case 'latest':
|
||||||
//最新章节
|
//最新章节
|
||||||
Route::get($strRoute, [Novel::class, 'getNovelLatestChapter'])
|
$strView = 'pc/getNovelCatalog.html';
|
||||||
|
if ($platform == 'h5') {
|
||||||
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
|
$strView = 'novel/getNovelCatalog.html';
|
||||||
|
}
|
||||||
|
Route::get($strRoute, function () use ($strView) {
|
||||||
|
return view($strView);
|
||||||
|
})
|
||||||
|
->pattern(['n_id' => '\d+', 'name' => '[\w-]+',]);
|
||||||
break;
|
break;
|
||||||
case 'chapter':
|
case 'chapter':
|
||||||
//章节
|
//章节
|
||||||
Route::get($strRoute, [Novel::class, 'getNovelChapter'])
|
$strView = 'pc/getNovelChapter.html';
|
||||||
|
if ($platform == 'h5') {
|
||||||
->pattern(['n_id' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
|
$strView = 'novel/getNovelChapter.html';
|
||||||
|
}
|
||||||
|
Route::get($strRoute, function () use ($strView) {
|
||||||
|
return view($strView);
|
||||||
|
})
|
||||||
|
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'intChapterSort' => '\d+', 'intChapterPage' => '\d+']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'kan-novel':
|
case 'kan-novel':
|
||||||
//伪造小说详情
|
//伪造小说详情
|
||||||
Route::get($strRoute, [Novel::class, 'getKanNovelInfo'])
|
$strView = 'pc/getNovelInfo.html';
|
||||||
|
if ($platform == 'h5') {
|
||||||
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
|
$strView = 'novel/getNovelInfo.html';
|
||||||
|
}
|
||||||
|
Route::get($strRoute, function () use ($strView) {
|
||||||
|
return view($strView);
|
||||||
|
})
|
||||||
|
->pattern(['n_id' => '\d+', 'n_forge_id' => '\d+', 'name' => '[\w-]+',]);
|
||||||
break;
|
break;
|
||||||
case 'novel':
|
case 'novel':
|
||||||
//小说详情
|
//小说详情
|
||||||
@@ -243,8 +259,15 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
|
|||||||
break;
|
break;
|
||||||
case 'search':
|
case 'search':
|
||||||
//搜素
|
//搜素
|
||||||
Route::get($strRoute, [Novel::class, 'getSearchNovel'])->ext('html');
|
$strView = 'pc/getSearchNovel.html';
|
||||||
|
if ($platform == 'h5') {
|
||||||
|
$strView = 'novel/getSearchNovel.html';
|
||||||
|
}
|
||||||
|
Route::get($strRoute, function () use ($strView) {
|
||||||
|
return view($strView);
|
||||||
|
})->ext('html');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'user':
|
case 'user':
|
||||||
//用户中心
|
//用户中心
|
||||||
Route::get($strRoute, [User::class, 'Index']);
|
Route::get($strRoute, [User::class, 'Index']);
|
||||||
|
|||||||
@@ -2,12 +2,20 @@
|
|||||||
{block name="title"}{site:replace code="NOVEL@GETNOVELCHAPTER@TITLE"}{/block}
|
{block name="title"}{site:replace code="NOVEL@GETNOVELCHAPTER@TITLE"}{/block}
|
||||||
{block name="keywords"}{site:replace code="NOVEL@GETNOVELCHAPTER@KEYWORDS"}{/block}
|
{block name="keywords"}{site:replace code="NOVEL@GETNOVELCHAPTER@KEYWORDS"}{/block}
|
||||||
{block name="description"}{site:replace code="NOVEL@GETNOVELCHAPTER@DESCRIPTION"}{/block}
|
{block name="description"}{site:replace code="NOVEL@GETNOVELCHAPTER@DESCRIPTION"}{/block}
|
||||||
|
|
||||||
{block name="head"}
|
{block name="head"}
|
||||||
|
|
||||||
|
{site:grm page_code="pc_novel_chapter" diff="$Request.route.intChapterSort" num="100" g_key="arrGrm" /}
|
||||||
|
{novel:info n_id="$Request.route.intNovelId" n_key="arrNovel" n_forge_id="0" /}
|
||||||
|
{chapter:info n_id="$Request.route.intNovelId" c_sort_num="$Request.route.intChapterSort"
|
||||||
|
c_page="$Request.route.intChapterPage" c_key="arrChapter" /}
|
||||||
|
|
||||||
<!-- 社交媒体标签 -->
|
<!-- 社交媒体标签 -->
|
||||||
|
|
||||||
<meta property="og:title" content="{$arrNovel['n_name']??'未知小说'} {$arrChapter.c_name} - {$DomainModel->d_name}" />
|
<meta property="og:title" content="{$arrNovel['n_name']??'未知小说'} {$arrChapter.c_name} - {$DomainModel->d_name}" />
|
||||||
<meta property="og:description" content="{$strDescription??'暂无简介'}" />
|
<meta property="og:description" content='{site:replace code="NOVEL@GETNOVELCHAPTER@DESCRIPTION"}' />
|
||||||
<meta property="og:url"
|
<meta property="og:url"
|
||||||
content='https://{$DomainModel->d_domain}{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" /}' />
|
content='https://{$DomainModel->d_domain}{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}' />
|
||||||
<meta property="og:type" content="book" />
|
<meta property="og:type" content="book" />
|
||||||
<meta property="og:image" content="{$arrNovel.n_cover_path ?? ''}" />
|
<meta property="og:image" content="{$arrNovel.n_cover_path ?? ''}" />
|
||||||
<meta property="og:site_name" content="{$DomainModel->d_name}" />
|
<meta property="og:site_name" content="{$DomainModel->d_name}" />
|
||||||
@@ -15,17 +23,19 @@
|
|||||||
<meta property="og:novel:author" content="{$arrNovel.n_author ?? ''}">
|
<meta property="og:novel:author" content="{$arrNovel.n_author ?? ''}">
|
||||||
<meta property="og:novel:book_name" content="{$arrNovel.n_name ?? ''}">
|
<meta property="og:novel:book_name" content="{$arrNovel.n_name ?? ''}">
|
||||||
<meta property="og:novel:read_url"
|
<meta property="og:novel:read_url"
|
||||||
content='https://{$DomainModel->d_domain}{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$$arrChapter[c_sort_num]"/}'>
|
content='https://{$DomainModel->d_domain}{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.c_sort_num"/}'>
|
||||||
<meta property="og:novel:status" content="{$arrNovel.n_status ?? ''}">
|
<meta property="og:novel:status" content="{$arrNovel.n_status ?? ''}">
|
||||||
<meta property="og:novel:update_time" content="{$arrNovel.n_update_time ?? ''}">
|
<meta property="og:novel:update_time" content="{$arrNovel.n_update_time ?? ''}">
|
||||||
<meta property="og:novel:latest_chapter_name" content="{$arrChapter.c_name}">
|
<meta property="og:novel:latest_chapter_name" content="{$arrChapter.c_name}">
|
||||||
<meta property="og:novel:latest_chapter_url"
|
<meta property="og:novel:latest_chapter_url"
|
||||||
content='https://{$DomainModel->d_domain}{site:lcpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" /}'>
|
content='https://{$DomainModel->d_domain}{site:lcpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'>
|
||||||
<!-- 可选:支持 Twitter Card -->
|
<!-- 可选:支持 Twitter Card -->
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
<meta name="twitter:title" content="{$arrNovel['n_name']??'未知小说'} {$arrChapter.c_name} - {$DomainModel->d_name}" />
|
<meta name="twitter:title" content="{$arrNovel['n_name']??'未知小说'} {$arrChapter.c_name} - {$DomainModel->d_name}" />
|
||||||
<meta name="twitter:description" content="{$strDescription ?? '暂无简介'}" />
|
<meta name="twitter:description" content="{$strDescription ?? '暂无简介'}" />
|
||||||
<meta name="twitter:image" content="{$arrNovel.n_cover_path ?? ''}" />
|
<meta name="twitter:image" content="{$arrNovel.n_cover_path ?? ''}" />
|
||||||
|
|
||||||
|
|
||||||
<!-- 结构化数据 -->
|
<!-- 结构化数据 -->
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
{
|
{
|
||||||
@@ -42,18 +52,17 @@
|
|||||||
"url": "https://{$DomainModel->d_domain}"
|
"url": "https://{$DomainModel->d_domain}"
|
||||||
},
|
},
|
||||||
"image": "{$arrNovel.n_cover_path ?? ''}",
|
"image": "{$arrNovel.n_cover_path ?? ''}",
|
||||||
"url":'https://{$DomainModel->d_domain}{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$arrChapter[c_sort_num]" c_page="0"/}',
|
"url":'https://{$DomainModel->d_domain}{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.c_sort_num" c_page="0"/}',
|
||||||
"inLanguage": "zh-CN",
|
"inLanguage": "zh-CN",
|
||||||
"genre": "{$arrNovel.n_category ??''}",
|
"genre": "{$arrNovel.n_category ??''}",
|
||||||
"datePublished": "{$arrNovel['n_update_time'] ?? time()}",
|
"datePublished": "{$arrNovel['n_update_time'] ?? time()}",
|
||||||
"hasPart": {
|
"hasPart": {
|
||||||
"@type": "CreativeWork",
|
"@type": "CreativeWork",
|
||||||
"name": "{$arrChapter.c_name ?? ''}",
|
"name": "{$arrChapter.c_name ?? ''}",
|
||||||
"url":'https://{$DomainModel->d_domain}{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$arrChapter[c_sort_num]" c_page="0"/}',
|
"url":'https://{$DomainModel->d_domain}{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.c_sort_num" c_page="0"/}',
|
||||||
"description": "{$strDescription}"
|
"description": '{site:replace code="NOVEL@GETNOVELCHAPTER@DESCRIPTION"}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
@@ -82,19 +91,19 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||||
<?php $arrNovel['n_category_pinyin'] ?? $arrNovel['n_category_pinyin'] = 'all'?>
|
<?php $arrNovel['n_category_pinyin'] ?? $arrNovel['n_category_pinyin'] = 'all'?>
|
||||||
<a href='{site:nflurl gender="" category="$arrNovel[n_category_pinyin]" order="all" status="all" page="1"/}' itemprop="item">
|
<a href='{site:nflurl gender="" category="$arrNovel.n_category_pinyin" order="all" status="all" page="1"/}' itemprop="item">
|
||||||
<span itemprop="name">{$arrNovel.n_category}</span>
|
<span itemprop="name">{$arrNovel.n_category}</span>
|
||||||
</a>
|
</a>
|
||||||
<meta itemprop="position" content="2" />
|
<meta itemprop="position" content="2" />
|
||||||
</li>
|
</li>
|
||||||
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||||
<a href='{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" /}' itemprop="item">
|
<a href='{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}' itemprop="item">
|
||||||
<span itemprop="name">{$arrNovel['n_name']}</span>
|
<span itemprop="name">{$arrNovel['n_name']}</span>
|
||||||
</a>
|
</a>
|
||||||
<meta itemprop="position" content="3" />
|
<meta itemprop="position" content="3" />
|
||||||
</li>
|
</li>
|
||||||
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||||
<a href='{site:nclurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" order="zheng" page="1"/}' itemprop="item">
|
<a href='{site:nclurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" order="zheng" page="1"/}' itemprop="item">
|
||||||
<span itemprop="name">{$arrChapter.c_name ?? ''}</span>
|
<span itemprop="name">{$arrChapter.c_name ?? ''}</span>
|
||||||
</a>
|
</a>
|
||||||
<meta itemprop="position" content="3" />
|
<meta itemprop="position" content="3" />
|
||||||
@@ -125,13 +134,13 @@
|
|||||||
<li><a href='javascript:'>上一页</a></li>
|
<li><a href='javascript:'>上一页</a></li>
|
||||||
{else}
|
{else}
|
||||||
<li><a
|
<li><a
|
||||||
href='{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$arrPreChapter[c_sort_num]" c_page="$arrPreChapter[c_page]"/}'>上一页</a>
|
href='{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.pre_chapter.c_sort_num" c_page="$arrChapter.pre_chapter.c_page"/}'>上一页</a>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
<li class="mulu"><a href='{site:nclurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" order="zheng" page="1"/}'>章节目录</a></li>
|
<li class="mulu"><a href='{site:nclurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" order="zheng" page="1"/}'>章节目录</a></li>
|
||||||
{if $arrNextChapter && $arrNextChapter.c_sort_num}
|
{if $arrChapter.next_chapter && $arrChapter.next_chapter.c_sort_num}
|
||||||
<li><a
|
<li><a
|
||||||
href='{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$arrNextChapter[c_sort_num]" c_page="$arrNextChapter[c_page]"/}'>下一页</a>
|
href='{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.next_chapter.c_sort_num" c_page="$arrChapter.next_chapter.c_page"/}'>下一页</a>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
@@ -147,13 +156,13 @@
|
|||||||
<li><a href='javascript:'>上一页</a></li>
|
<li><a href='javascript:'>上一页</a></li>
|
||||||
{else}
|
{else}
|
||||||
<li><a
|
<li><a
|
||||||
href='{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$arrPreChapter[c_sort_num]" c_page="$arrPreChapter[c_page]"/}'>上一页</a>
|
href='{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.pre_chapter.c_sort_num" c_page="$arrChapter.pre_chapter.c_page"/}'>上一页</a>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
<li class="mulu"><a href='{site:nclurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" order="zheng" page="1"/}'>章节目录</a></li>
|
<li class="mulu"><a href='{site:nclurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" order="zheng" page="1"/}'>章节目录</a></li>
|
||||||
{if $arrNextChapter && $arrNextChapter.c_sort_num}
|
{if $arrChapter.next_chapter && $arrChapter.next_chapter.c_sort_num}
|
||||||
<li><a
|
<li><a
|
||||||
href='{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$arrNextChapter[c_sort_num]" c_page="$arrNextChapter[c_page]"/}'>下一页</a>
|
href='{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.next_chapter.c_sort_num" c_page="$arrChapter.next_chapter.c_page"/}'>下一页</a>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -163,22 +172,23 @@
|
|||||||
<div class="wrap-box">
|
<div class="wrap-box">
|
||||||
<h3 class="wrap-title"><span>完结推荐</span></h3>
|
<h3 class="wrap-title"><span>完结推荐</span></h3>
|
||||||
<div class="rec-focus">
|
<div class="rec-focus">
|
||||||
{foreach $arrEndNovel as $key=>$Novel }
|
{novel:list count="6" n_category="$arrNovel.n_category_pinyin" n_status="wanjie" d_key="d_key" d_val="Novel"
|
||||||
|
p_val="page_data" cache_life="86400"}
|
||||||
<dl class="rec-focus-book">
|
<dl class="rec-focus-book">
|
||||||
<dt class="book-img"><a
|
<dt class="book-img"><a
|
||||||
href='{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" /}'><img
|
href='{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'><img
|
||||||
height="100" width="80" class="lazyload-img" src="/static/img/default.jpg"
|
height="100" width="80" class="lazyload-img" src="/static/img/default.jpg"
|
||||||
data-src="{$Novel.n_cover_path ?? ''}"
|
data-src="{$Novel.n_cover_path ?? ''}"
|
||||||
alt="{$Novel.n_name ?? ''} - {$Novel.n_category ?? ''}最新章节在线免费阅读"></a></dt>
|
alt="{$Novel.n_name ?? ''} - {$Novel.n_category ?? ''}最新章节在线免费阅读"></a></dt>
|
||||||
<dd class="book-info">
|
<dd class="book-info">
|
||||||
<h2><a
|
<h2><a
|
||||||
href='{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" /}'>{$Novel.n_name}</a>
|
href='{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'>{$Novel.n_name}</a>
|
||||||
</h2>
|
</h2>
|
||||||
<p>作者:{$Novel.n_author}</p>
|
<p>作者:{$Novel.n_author}</p>
|
||||||
<p>{$Novel.n_description}</p>
|
<p>{$Novel.n_description}</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
{/foreach}
|
{/novel:list}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -186,17 +196,17 @@
|
|||||||
<h3 class="wrap-title"><span>相邻小说</span></h3>
|
<h3 class="wrap-title"><span>相邻小说</span></h3>
|
||||||
<div class="description" style="font-size: 12px;padding:0px 10px 10px 10px; text-indent: 15px;">
|
<div class="description" style="font-size: 12px;padding:0px 10px 10px 10px; text-indent: 15px;">
|
||||||
|
|
||||||
{$strFocus ?? ""} 。看小说就来{$DomainModel->d_name} {$DomainModel->d_domain}...
|
{$arrNovel.strFocus ?? ""} 。看小说就来{$DomainModel->d_name} {$DomainModel->d_domain}...
|
||||||
</div>
|
</div>
|
||||||
<div class="rec-focus" style="font-size:12px;">
|
<div class="rec-focus" style="font-size:12px;">
|
||||||
{volist name='arrRelateveNovel' id='Novel'}
|
{volist name='arrNovel.arrRelateveNovel' id='Novel'}
|
||||||
<a
|
<a
|
||||||
href='{site:nurl n_id="$Novel[n_id]" n_py="$Novel[n_name_pinyin]" /}'>{$Novel.n_name}</a>
|
href='{site:nurl n_id="$Novel.n_id" n_py="$Novel.n_name_pinyin" /}'>{$Novel.n_name}</a>
|
||||||
{/volist}
|
{/volist}
|
||||||
|
|
||||||
{volist name='arrNovel.n_forge_novel' id='ForgeNovel'}
|
{volist name="arrNovel.n_forge_novel" id="ForgeNovel" key="key"}
|
||||||
<a
|
<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>
|
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>
|
||||||
{/volist}
|
{/volist}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
{block name="description"}{site:replace code="NOVEL@GETNOVELCATALOG@DESCRIPTION"}{/block}
|
{block name="description"}{site:replace code="NOVEL@GETNOVELCATALOG@DESCRIPTION"}{/block}
|
||||||
{block name="head"}
|
{block name="head"}
|
||||||
{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="0" /}
|
||||||
{site:grm page_code="pc_novel_info" diff="$arrNovel.n_id" num="100" g_key="arrGrm" /}
|
{site:grm page_code="pc_novel_catalog" diff="$arrNovel.n_id" num="100" g_key="arrGrm" /}
|
||||||
<!-- 社交媒体标签 -->
|
<!-- 社交媒体标签 -->
|
||||||
<meta property="og:title" content="{$arrNovel['n_name']??'未知小说'}" />
|
<meta property="og:title" content="{$arrNovel['n_name']??'未知小说'}" />
|
||||||
<meta property="og:description" content="{$strDescription??'暂无简介'}" />
|
<meta property="og:description" content="{$strDescription??'暂无简介'}" />
|
||||||
|
|||||||
@@ -4,10 +4,16 @@
|
|||||||
{block name="description"}{site:replace code="NOVEL@GETNOVELCHAPTER@DESCRIPTION"}{/block}
|
{block name="description"}{site:replace code="NOVEL@GETNOVELCHAPTER@DESCRIPTION"}{/block}
|
||||||
|
|
||||||
{block name="head"}
|
{block name="head"}
|
||||||
|
{site:grm page_code="pc_novel_chapter" diff="$Request.route.intChapterSort" num="100" g_key="arrGrm" /}
|
||||||
|
{novel:info n_id="$Request.route.intNovelId" n_key="arrNovel" n_forge_id="0" /}
|
||||||
|
{chapter:info n_id="$Request.route.intNovelId" c_sort_num="$Request.route.intChapterSort"
|
||||||
|
c_page="$Request.route.intChapterPage" c_key="arrChapter" /}
|
||||||
|
|
||||||
|
|
||||||
<meta property="og:title" content="{$arrNovel['n_name']??'未知小说'} {$arrChapter.c_name} - {$DomainModel->d_name}" />
|
<meta property="og:title" content="{$arrNovel['n_name']??'未知小说'} {$arrChapter.c_name} - {$DomainModel->d_name}" />
|
||||||
<meta property="og:description" content="{$strDescription??'暂无简介'}" />
|
<meta property="og:description" content='{site:replace code="NOVEL@GETNOVELCHAPTER@DESCRIPTION"}' />
|
||||||
<meta property="og:url"
|
<meta property="og:url"
|
||||||
content='https://{$DomainModel->d_domain}{$strPcPath}{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" /}' />
|
content='https://{$DomainModel->d_domain}{$strPcPath}{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}' />
|
||||||
<meta property="og:type" content="book" />
|
<meta property="og:type" content="book" />
|
||||||
<meta property="og:image" content="{$arrNovel.n_cover_path ?? ''}" />
|
<meta property="og:image" content="{$arrNovel.n_cover_path ?? ''}" />
|
||||||
<meta property="og:site_name" content="{$DomainModel->d_name}" />
|
<meta property="og:site_name" content="{$DomainModel->d_name}" />
|
||||||
@@ -15,18 +21,18 @@
|
|||||||
<meta property="og:novel:author" content="{$arrNovel.n_author ?? ''}">
|
<meta property="og:novel:author" content="{$arrNovel.n_author ?? ''}">
|
||||||
<meta property="og:novel:book_name" content="{$arrNovel.n_name ?? ''}">
|
<meta property="og:novel:book_name" content="{$arrNovel.n_name ?? ''}">
|
||||||
<meta property="og:novel:read_url"
|
<meta property="og:novel:read_url"
|
||||||
content='https://{$DomainModel->d_domain}{$strPcPath}{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$$arrChapter[c_sort_num]"/}'>
|
content='https://{$DomainModel->d_domain}{$strPcPath}{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.c_sort_num"/}'>
|
||||||
<meta property="og:novel:status" content="{$arrNovel.n_status ?? ''}">
|
<meta property="og:novel:status" content="{$arrNovel.n_status ?? ''}">
|
||||||
<meta property="og:novel:update_time" content="{$arrNovel.n_update_time ?? ''}">
|
<meta property="og:novel:update_time" content="{$arrNovel.n_update_time ?? ''}">
|
||||||
<meta property="og:novel:latest_chapter_name" content="{$arrChapter.c_name}">
|
<meta property="og:novel:latest_chapter_name" content="{$arrChapter.c_name}">
|
||||||
<meta property="og:novel:latest_chapter_url"
|
<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]" /}'>
|
content='https://{$DomainModel->d_domain}{$strPcPath}{site:lcpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'>
|
||||||
<!-- 可选:支持 Twitter Card -->
|
<!-- 可选:支持 Twitter Card -->
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
<meta name="twitter:title" content="{$arrNovel['n_name']??'未知小说'} {$arrChapter.c_name} - {$DomainModel->d_name}" />
|
<meta name="twitter:title" content="{$arrNovel['n_name']??'未知小说'} {$arrChapter.c_name} - {$DomainModel->d_name}" />
|
||||||
<meta name="twitter:description" content="{$strDescription ?? '暂无简介'}" />
|
<meta name="twitter:description" content="{$strDescription ?? '暂无简介'}" />
|
||||||
<meta name="twitter:image" content="{$arrNovel.n_cover_path ?? ''}" />
|
<meta name="twitter:image" content="{$arrNovel.n_cover_path ?? ''}" />
|
||||||
<!-- 结构化数据 -->
|
|
||||||
<!-- 结构化数据 -->
|
<!-- 结构化数据 -->
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
{
|
{
|
||||||
@@ -43,23 +49,24 @@
|
|||||||
"url": "https://{$DomainModel->d_domain}"
|
"url": "https://{$DomainModel->d_domain}"
|
||||||
},
|
},
|
||||||
"image": "{$arrNovel.n_cover_path ?? ''}",
|
"image": "{$arrNovel.n_cover_path ?? ''}",
|
||||||
"url":'https://{$DomainModel->d_domain}{$strPcPath}{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$arrChapter[c_sort_num]" c_page="0"/}',
|
"url":'https://{$DomainModel->d_domain}{$strPcPath}{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.c_sort_num" c_page="0"/}',
|
||||||
"inLanguage": "zh-CN",
|
"inLanguage": "zh-CN",
|
||||||
"genre": "{$arrNovel.n_category ??''}",
|
"genre": "{$arrNovel.n_category ??''}",
|
||||||
"datePublished": "{$arrNovel['n_update_time'] ?? time()}",
|
"datePublished": "{$arrNovel['n_update_time'] ?? time()}",
|
||||||
"hasPart": {
|
"hasPart": {
|
||||||
"@type": "CreativeWork",
|
"@type": "CreativeWork",
|
||||||
"name": "{$arrChapter.c_name ?? ''}",
|
"name": "{$arrChapter.c_name ?? ''}",
|
||||||
"url":'https://{$DomainModel->d_domain}{$strPcPath}{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$arrChapter[c_sort_num]" c_page="0"/}',
|
"url":'https://{$DomainModel->d_domain}{$strPcPath}{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.c_sort_num" c_page="0"/}',
|
||||||
"description": "{$strDescription}"
|
"description": '{site:replace code="NOVEL@GETNOVELCHAPTER@DESCRIPTION"}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="head-css"}
|
{block name="head-css"}
|
||||||
<link rel="canonical"
|
<link rel="canonical"
|
||||||
href='https://{$DomainModel->d_domain}{$strPcPath}{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$arrChapter[c_sort_num]"/}'>
|
href='https://{$DomainModel->d_domain}{$strPcPath}{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.c_sort_num"/}'>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="head-js"}
|
{block name="head-js"}
|
||||||
@@ -76,8 +83,9 @@
|
|||||||
<div class="layout layout-col1">
|
<div class="layout layout-col1">
|
||||||
<h2 class="layout-tit xs-hidden">
|
<h2 class="layout-tit xs-hidden">
|
||||||
<a href="{$strPcPath}/">{$DomainModel->d_name}</a>><a
|
<a href="{$strPcPath}/">{$DomainModel->d_name}</a>><a
|
||||||
href='{$strPcPath}{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" /}'>{$arrNovel.n_name}</a> >
|
href='{$strPcPath}{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'>{$arrNovel.n_name}</a>
|
||||||
{$arrNovel.n_name}(第{$arrChapter.c_sort_num}页)
|
>
|
||||||
|
{$arrNovel.n_name}(第{$arrChapter.c_sort_num}页)
|
||||||
</h2>
|
</h2>
|
||||||
<div class="word_read">
|
<div class="word_read">
|
||||||
<h3>{$arrNovel.n_name}(第{$arrChapter['c_sort_num']}页)</h3>
|
<h3>{$arrNovel.n_name}(第{$arrChapter['c_sort_num']}页)</h3>
|
||||||
@@ -87,15 +95,16 @@
|
|||||||
{else}
|
{else}
|
||||||
{$arrGrm[10]|raw}
|
{$arrGrm[10]|raw}
|
||||||
<a id="j_chapterPrev"
|
<a id="j_chapterPrev"
|
||||||
href='{$strPcPath}{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$arrPreChapter[c_sort_num]" c_page="$arrPreChapter[c_page]"/}'>上一页</a>
|
href='{$strPcPath}{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.pre_chapter.c_sort_num" c_page="$arrChapter.pre_chapter.c_page"/}'>上一页</a>
|
||||||
{/if}
|
{/if}
|
||||||
<span>|</span>
|
<span>|</span>
|
||||||
<a href='{site:nclurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" order="zheng" page="1"/}'>章节目录</a>
|
<a
|
||||||
|
href='{$strPcPath}{site:nclurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" order="zheng" page="1"/}'>章节目录</a>
|
||||||
<span>|</span>
|
<span>|</span>
|
||||||
{if $arrNextChapter && $arrNextChapter.c_sort_num}
|
{if $arrChapter.next_chapter && $arrChapter.next_chapter.c_sort_num}
|
||||||
{$arrGrm[9]|raw}
|
{$arrGrm[9]|raw}
|
||||||
<a id="j_chapterNext"
|
<a id="j_chapterNext"
|
||||||
href='{$strPcPath}{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$arrNextChapter[c_sort_num]" c_page="$arrNextChapter[c_page]"/}'>下一页</a>
|
href='{$strPcPath}{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.next_chapter.c_sort_num" c_page="$arrChapter.next_chapter.c_page"/}'>下一页</a>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -104,65 +113,67 @@
|
|||||||
<p>请勿开启浏览器阅读模式,否则将导致章节内容缺失及无法阅读下一页。</p>
|
<p>请勿开启浏览器阅读模式,否则将导致章节内容缺失及无法阅读下一页。</p>
|
||||||
|
|
||||||
<p>相邻推荐:
|
<p>相邻推荐:
|
||||||
{volist name="arrNovel.n_forge_novel" id="ForgeNovel" key="key"}
|
{volist name="arrNovel.n_forge_novel" id="ForgeNovel" key="key"}
|
||||||
{if $key<19 }
|
{if $key<19 } {$arrGrm[$key+9]|raw} {/if} <a
|
||||||
{$arrGrm[$key+9]|raw}
|
href='{$strPcPath}{site:nnurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" n_fid="$ForgeNovel.n_forge_id"/}'
|
||||||
{/if}
|
class="red">{$ForgeNovel.n_forge_title}</a>
|
||||||
<a
|
{/volist}
|
||||||
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}
|
|
||||||
|
|
||||||
{volist name='arrRelateveNovel' id='Novel'}
|
{volist name='arrNovel.arrRelateveNovel' id='Novel'}
|
||||||
<a href='{$strPcPath}{site:nurl n_id="$Novel[n_id]" n_py="$Novel[n_name_pinyin]" /}'>{$Novel.n_name}</a>
|
<a
|
||||||
{/volist}
|
href='{$strPcPath}{site:nurl n_id="$Novel.n_id" n_py="$Novel.n_name_pinyin" /}'>{$Novel.n_name}</a>
|
||||||
|
{/volist}
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
<div class="read_btn">
|
<div class="read_btn">
|
||||||
{if $arrChapter && $arrChapter.c_sort_num && $arrChapter.c_sort_num == 1}
|
{if $arrChapter && $arrChapter.c_sort_num && $arrChapter.c_sort_num == 1}
|
||||||
<a id="j_chapterPrev" href="javascript:void(0);">上一页</a>
|
<a id="j_chapterPrev" href="javascript:void(0);">上一页</a>
|
||||||
{else}
|
{else}
|
||||||
{$arrGrm[10]|raw}
|
{$arrGrm[10]|raw}
|
||||||
<a id="j_chapterPrev"
|
<a id="j_chapterPrev"
|
||||||
href='{$strPcPath}{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$arrPreChapter[c_sort_num]" c_page="$arrPreChapter[c_page]"/}'>上一页</a>
|
href='{$strPcPath}{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.pre_chapter.c_sort_num" c_page="$arrChapter.pre_chapter.c_page"/}'>上一页</a>
|
||||||
{/if}
|
{/if}
|
||||||
<span>|</span>
|
<span>|</span>
|
||||||
<a href='{site:nclurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" order="zheng" page="1"/}'>章节目录</a>
|
<a
|
||||||
|
href='{$strPcPath}{site:nclurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" order="zheng" page="1"/}'>章节目录</a>
|
||||||
<span>|</span>
|
<span>|</span>
|
||||||
{if $arrNextChapter && $arrNextChapter.c_sort_num}
|
{if $arrChapter.next_chapter && $arrChapter.next_chapter.c_sort_num}
|
||||||
{$arrGrm[9]|raw}
|
{$arrGrm[9]|raw}
|
||||||
<a id="j_chapterNext"
|
<a id="j_chapterNext"
|
||||||
href='{$strPcPath}{site:cpurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" c_sort="$arrNextChapter[c_sort_num]" c_page="$arrNextChapter[c_page]"/}'>下一页</a>
|
href='{$strPcPath}{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$arrChapter.next_chapter.c_sort_num" c_page="$arrChapter.next_chapter.c_page"/}'>下一页</a>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row row-section">
|
<div class="row row-section">
|
||||||
<h2 class="layout-tit">已完结热门小说推荐</h2>
|
<h2 class="layout-tit">已完结热门小说推荐</h2>
|
||||||
<div class="layout layout-col3">
|
<div class="layout layout-col3">read_btn
|
||||||
|
|
||||||
{foreach $arrEndNovel as $key=>$Novel }
|
{novel:list count="6" n_category="$arrNovel.n_category_pinyin" n_status="wanjie" d_key="d_key" d_val="Novel"
|
||||||
<div class="item">
|
p_val="page_data" cache_life="86400"}
|
||||||
|
<div class="item">
|
||||||
<div class="image">
|
<div class="image">
|
||||||
<a href='{$strPcPath}{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" /}'>
|
<a href='{$strPcPath}{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'>
|
||||||
<img style="min-height:120px;" class="lazyload-img" src="/static/img/default.jpg"
|
<img style="min-height:120px;" class="lazyload-img" src="/static/img/default.jpg"
|
||||||
data-src="{$Novel.n_cover_path ?? ''}"
|
data-src="{$Novel.n_cover_path ?? ''}"
|
||||||
alt="{$Novel.n_name ?? ''} - {$Novel.n_category ?? ''}最新章节在线免费阅读">
|
alt="{$Novel.n_name ?? ''} - {$Novel.n_category ?? ''}最新章节在线免费阅读">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><span>{$Novel.n_author}</span><a
|
<dt><span>{$Novel.n_author}</span><a
|
||||||
href='{$strPcPath}{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" /}'>{$Novel.n_name}</a></dt>
|
href='{$strPcPath}{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'>{$Novel.n_name}</a></dt>
|
||||||
<dd style="height:90px"><a href='{$strPcPath}{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[n_name_pinyin]" /}'
|
<dd style="height:90px"><a href='{$strPcPath}{site:nurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" /}'
|
||||||
style="color: #555">{$Novel.n_description}</a>
|
style="color: #555">{$Novel.n_description}</a>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
{/novel:list}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
|||||||
@@ -12,17 +12,21 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="layout layout3 layout-col3 fl">
|
<div class="layout layout3 layout-col3 fl">
|
||||||
<h1>{$strSearchKeywords}搜索结果 - {$DomainModel->d_name} 第{$intPage}页</h1>
|
<h1>{$Request.get.keyword}搜索结果 - {$DomainModel->d_name} 第{$Request.get.page}页</h1>
|
||||||
<div class="result search_tip">
|
<div class="result search_tip">
|
||||||
搜索<span style="color:red">“{$strSearchKeywords}”</span>相关结果共有 <span
|
搜索<span style="color:red">“{$Request.get.keyword}”</span>相关结果共有 <span
|
||||||
style="color:red">{$arrPage.total}</span> 部小说
|
style="color:red">{$total}</span> 部小说
|
||||||
</div>
|
</div>
|
||||||
{if empty($arrPage.data)}
|
{if $total <1}
|
||||||
<p style="text-align: center;line-height: 60px">没有相关数据</p>
|
<p style="text-align: center;line-height: 60px">没有相关数据</p>
|
||||||
{else}
|
{else}
|
||||||
<div class="layout layout-col3">
|
<div class="layout layout-col3">
|
||||||
|
|
||||||
{foreach $arrPage.data as $key=>$Novel}
|
{novel:pager page="$Request.get.page" limit="30"
|
||||||
|
key="$Request.get.keyword"
|
||||||
|
d_key="d_key"
|
||||||
|
d_val="Novel" n_num="total"
|
||||||
|
p_val="page_data" button_num="10" cache_life="86400" func="generateSearchPager"}
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="image">
|
<div class="image">
|
||||||
<a href='{$strPcPath}{site:nurl n_id="$Novel[n_id]" n_py="$Novel[n_name_pinyin]" /}'>
|
<a href='{$strPcPath}{site:nurl n_id="$Novel[n_id]" n_py="$Novel[n_name_pinyin]" /}'>
|
||||||
@@ -40,7 +44,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
{/novel:pager}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -51,17 +55,17 @@
|
|||||||
|
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<div class="row sort_page_num">
|
<div class="row sort_page_num">
|
||||||
{volist name="arrPaginator" id="vo" key="k"}
|
{volist name="page_data" id="vo" key="k"}
|
||||||
{switch $vo.label}
|
{switch $vo.label}
|
||||||
{case value="上一页"}
|
{case value="上一页"}
|
||||||
{if $intPage == 1}
|
{if $Request.get.page == 1}
|
||||||
<span>«</span>
|
<span>«</span>
|
||||||
{else}
|
{else}
|
||||||
<a href="{$strPcPath}{$vo.url}">«</a>
|
<a href="{$strPcPath}{$vo.url}">«</a>
|
||||||
{/if}
|
{/if}
|
||||||
{/case}
|
{/case}
|
||||||
{case value="下一页"}
|
{case value="下一页"}
|
||||||
{if $intPage >= $intTotalPage}
|
{if $Request.get.page >= $total}
|
||||||
<span>»</span>
|
<span>»</span>
|
||||||
{else}
|
{else}
|
||||||
<a href="{$strPcPath}{$vo.url}">»</a>
|
<a href="{$strPcPath}{$vo.url}">»</a>
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ class ChapterService
|
|||||||
{
|
{
|
||||||
// 小说详情
|
// 小说详情
|
||||||
$arrNovel = $this->NovelModel->getNovelByNId($intNId);
|
$arrNovel = $this->NovelModel->getNovelByNId($intNId);
|
||||||
|
|
||||||
// 章节
|
// 章节
|
||||||
$ChapterModel = ChapterModel::getInstance();
|
$ChapterModel = ChapterModel::getInstance();
|
||||||
$arrFilter = ['n_id' => $intNId, 'c_sort_num' => $intCSortNum, 'c_page' => $intCPage];
|
$arrFilter = ['n_id' => $intNId, 'c_sort_num' => $intCSortNum, 'c_page' => $intCPage];
|
||||||
@@ -244,7 +244,7 @@ class ChapterService
|
|||||||
|
|
||||||
$arrChapter['pre_chapter'] = $arrPreChapter;
|
$arrChapter['pre_chapter'] = $arrPreChapter;
|
||||||
$arrChapter['next_chapter'] = $arrNextChapter;
|
$arrChapter['next_chapter'] = $arrNextChapter;
|
||||||
|
// var_dump($arrChapter['c_name']);exit;
|
||||||
// 更新值
|
// 更新值
|
||||||
ConverterMovel::setVal([
|
ConverterMovel::setVal([
|
||||||
'intPage' => 1,
|
'intPage' => 1,
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ class NovelService
|
|||||||
}
|
}
|
||||||
|
|
||||||
# n_category_sex_zh filter
|
# n_category_sex_zh filter
|
||||||
if (!empty($strKey)) {
|
if (!empty($strNSex)) {
|
||||||
|
|
||||||
$strKey = mb_substr($strKey, 0, 30);
|
$strKey = mb_substr($strKey, 0, 30);
|
||||||
$arrFilter['$and'][] = [
|
$arrFilter['$and'][] = [
|
||||||
@@ -454,10 +454,6 @@ class NovelService
|
|||||||
$strCacheKey = '';
|
$strCacheKey = '';
|
||||||
$intLifeTime = 0;
|
$intLifeTime = 0;
|
||||||
|
|
||||||
if (empty($arrFilter['$and'])) {
|
|
||||||
$arrFilter = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
# cache filter
|
# cache filter
|
||||||
if ($intCacheLifeTime > 0) {
|
if ($intCacheLifeTime > 0) {
|
||||||
$strCacheKey = sprintf(
|
$strCacheKey = sprintf(
|
||||||
@@ -472,7 +468,7 @@ class NovelService
|
|||||||
|
|
||||||
$intLifeTime = $intLifeTime;
|
$intLifeTime = $intLifeTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
$arrNovel = $this->NovelModel->findPaginatedWithCache(
|
$arrNovel = $this->NovelModel->findPaginatedWithCache(
|
||||||
$arrFilter,
|
$arrFilter,
|
||||||
$intPage,
|
$intPage,
|
||||||
@@ -483,7 +479,7 @@ class NovelService
|
|||||||
);
|
);
|
||||||
|
|
||||||
$arrPager = call_user_func([$this, $Func], $arrParams, $arrSort, $arrNovel);
|
$arrPager = call_user_func([$this, $Func], $arrParams, $arrSort, $arrNovel);
|
||||||
|
|
||||||
$arrResult = [
|
$arrResult = [
|
||||||
'data' => $arrNovel['data'] ?? [],
|
'data' => $arrNovel['data'] ?? [],
|
||||||
'pages' => $arrNovel['pages'] ?? 0,
|
'pages' => $arrNovel['pages'] ?? 0,
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ EOT;
|
|||||||
{$c_page}
|
{$c_page}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
\${$c_key} = \$arrChapter ?? [];
|
\${$c_key} = \$arrChapter ?? [];
|
||||||
?>
|
?>
|
||||||
EOT;
|
EOT;
|
||||||
|
|||||||
@@ -108,6 +108,7 @@
|
|||||||
$sort_type ?? "all"; # 排序方式
|
$sort_type ?? "all"; # 排序方式
|
||||||
$n_status ?? "all"; # 查询状态
|
$n_status ?? "all"; # 查询状态
|
||||||
$n_sex ?? "all"; # 查询性别
|
$n_sex ?? "all"; # 查询性别
|
||||||
|
$key ?? ""; # 查询 搜索
|
||||||
$button_num ?? "10"; # 分页按钮数量
|
$button_num ?? "10"; # 分页按钮数量
|
||||||
$diff_key ?? ""; # 缓存键值差异
|
$diff_key ?? ""; # 缓存键值差异
|
||||||
$cache_life ?? '0'; # 缓存时间,如果需要开启缓存,这个字段必须传,而且必须大于0
|
$cache_life ?? '0'; # 缓存时间,如果需要开启缓存,这个字段必须传,而且必须大于0
|
||||||
@@ -115,7 +116,7 @@
|
|||||||
$d_val ?? 'd_val'; # 查询出来的数据遍历的时候, 值的名称
|
$d_val ?? 'd_val'; # 查询出来的数据遍历的时候, 值的名称
|
||||||
$p_val ?? 'p_val'; # 分页页码数据,这是一个数组。和之前控制器渲染的那个数组一致的。
|
$p_val ?? 'p_val'; # 分页页码数据,这是一个数组。和之前控制器渲染的那个数组一致的。
|
||||||
$n_num ?? 'n_num'; # 数据总量。和之前控制器渲染的那个 intTotalPage 一致的。
|
$n_num ?? 'n_num'; # 数据总量。和之前控制器渲染的那个 intTotalPage 一致的。
|
||||||
$func ; # 这个参数是一个回调方法名,用来渲染分页页码数据的,该方法需要在 NovelService 类里面实现,func(array $arrParams, array $arrSort, array $arrNovel)
|
$func ; # 这个参数是一个回调方法名,用来渲染分页页码数据的,该方法需要在 NovelService 类里面实现,func(array $arrParams, array $arrSort, array $arrNovel) generateCategoryPager generateSearchPager
|
||||||
# 样例
|
# 样例
|
||||||
{novel:pager page="1" limit="10" n_category="$Request.route.category" d_key="d_key" d_val="novel" p_val="page_data" button_num="3" cache_life="1000" func="generateSearchPager"}
|
{novel:pager page="1" limit="10" n_category="$Request.route.category" d_key="d_key" d_val="novel" p_val="page_data" button_num="3" cache_life="1000" func="generateSearchPager"}
|
||||||
<li>
|
<li>
|
||||||
@@ -201,23 +202,15 @@
|
|||||||
{/chapter:list}
|
{/chapter:list}
|
||||||
|
|
||||||
|
|
||||||
# 10、 获取指定小说多个章节数据并且遍历
|
# 10、 获取小说章节详情数据
|
||||||
# 传参与默认值(传参用下面的变量名,名称不需要$符号, 值的话如果用第三方变量作为值,需要带$符号):
|
# 传参与默认值(传参用下面的变量名,名称不需要$符号, 值的话如果用第三方变量作为值,需要带$符号):
|
||||||
$count ?? '10'; # 查询条数
|
$n_id ; # 传入的小说ID
|
||||||
$n_id ; # 小说ID
|
$c_sort_num ; # 传入的章节索引
|
||||||
$sort_type ?? "all"; # 排序方式
|
$c_page ; # 传入的章节页码
|
||||||
$diff_key ?? ""; # 缓存键值差异
|
$n_key ; # 查询出来的数据待使用的变量名称
|
||||||
$cache_life ?? '0'; # 缓存时间,如果需要开启缓存,这个字段必须传,而且必须大于0
|
|
||||||
$d_key ?? 'd_key'; # 查询出来的数据遍历的时候, 下标键变量的名称
|
|
||||||
$d_val ?? 'd_val'; # 查询出来的数据遍历的时候, 值的名称
|
|
||||||
# 样例
|
# 样例
|
||||||
{chapter:list count="10" n_id="$Request.get.n_id" d_key="d_key" d_val="chapter" cache_life="1000"}
|
{chapter:info n_id="1" c_sort_num="200" c_page="0" c_key="arrChapter01" /}
|
||||||
<li>
|
{$arrChapter01.c_name}
|
||||||
Index: {$d_key}
|
|
||||||
章节名称: {$chapter.c_name}
|
|
||||||
章节序号: {$chapter.c_sort_num}
|
|
||||||
</li>
|
|
||||||
{/chapter:list}
|
|
||||||
|
|
||||||
|
|
||||||
# 11、 获取指定小说分页数据并且遍历
|
# 11、 获取指定小说分页数据并且遍历
|
||||||
|
|||||||
Reference in New Issue
Block a user