This commit is contained in:
make
2025-04-20 21:50:58 +08:00
parent 34206fe268
commit 3216cffb5e
15 changed files with 352 additions and 233 deletions

View File

@@ -80,9 +80,12 @@ $arrRoutes = [
// 书库 // 书库
'library' => [ 'library' => [
/** /**
* /shuku/nansheng-xiaoshuo/all/all/all/page1
* '/:strGender?/:strCategory?/:strStatus?/:strOrder?/:intPage?';
* 完整路由 * 完整路由
* 使用: {site:nflurl gender="$strGender" category="$CategoryPinyin" status="all" order="all" page="1"/} * 使用: {site:nflurl gender="$strGender" category="$CategoryPinyin" status="all" order="all" page="1"/}
*/ */
// '/shuku/:strGender?/:strCategory?/:strStatus?/:strOrder?/page:intPage?',
'/shuku/:strGender/:strCategory/:strStatus/:strOrder/page:intPage', '/shuku/:strGender/:strCategory/:strStatus/:strOrder/page:intPage',
'/books/:strGender/:strCategory/:strStatus/:strOrder/page:intPage', '/books/:strGender/:strCategory/:strStatus/:strOrder/page:intPage',
'/library/:strGender/:strCategory/:strStatus/:strOrder/page:intPage', '/library/:strGender/:strCategory/:strStatus/:strOrder/page:intPage',
@@ -109,12 +112,12 @@ $arrRoutes = [
* 使用 gender 传空/或者不传,控制器会默认值是 all * 使用 gender 传空/或者不传,控制器会默认值是 all
* {site:nflurl gender="" category="$CategoryPinyin" status="all" order="all" page="1"/} * {site:nflurl gender="" category="$CategoryPinyin" status="all" order="all" page="1"/}
*/ */
'/shuku/:strCategory/:strStatus/page:intPage', // '/shuku/:strCategory/:strStatus/page:intPage',
'/books/:strCategory/:strStatus/page:intPage', // '/books/:strCategory/:strStatus/page:intPage',
'/library/:strCategory/:strStatus/page:intPage', // '/library/:strCategory/:strStatus/page:intPage',
'/fenlei/:strCategory/:strStatus/page:intPage', // '/fenlei/:strCategory/:strStatus/page:intPage',
'/class/:strCategory/:strStatus/page:intPage', // '/class/:strCategory/:strStatus/page:intPage',
'/category/:strCategory/:strStatus/page:intPage', // '/category/:strCategory/:strStatus/page:intPage',
/** /**
* default 模板 * default 模板
@@ -122,12 +125,12 @@ $arrRoutes = [
* 使用 gender 传空/或者不传,控制器会默认值是 all * 使用 gender 传空/或者不传,控制器会默认值是 all
* {site:nflurl gender="" category="$CategoryPinyin" status="all" order="all" page="1"/} * {site:nflurl gender="" category="$CategoryPinyin" status="all" order="all" page="1"/}
*/ */
'/shuku/:strCategory/:strOrder/page:intPage', // '/shuku/:strCategory/:strOrder/page:intPage',
'/books/:strCategory/:strOrder/page:intPage', // '/books/:strCategory/:strOrder/page:intPage',
'/library/:strCategory/:strOrder/page:intPage', // '/library/:strCategory/:strOrder/page:intPage',
'/fenlei/:strCategory/:strOrder/page:intPage', // '/fenlei/:strCategory/:strOrder/page:intPage',
'/class/:strCategory/:strOrder/page:intPage', // '/class/:strCategory/:strOrder/page:intPage',
'/category/:strCategory/:strOrder/page:intPage', // '/category/:strCategory/:strOrder/page:intPage',
/** /**
@@ -136,12 +139,12 @@ $arrRoutes = [
* 使用 gender 传空/或者不传,控制器会默认值是 all * 使用 gender 传空/或者不传,控制器会默认值是 all
* {site:nflurl gender="" category="$CategoryPinyin" status="all" order="all" page="1"/} * {site:nflurl gender="" category="$CategoryPinyin" status="all" order="all" page="1"/}
*/ */
'/shuku/:strCategory/page:intPage', // '/shuku/:strCategory/page:intPage',
'/books/:strCategory/page:intPage', // '/books/:strCategory/page:intPage',
'/library/:strCategory/page:intPage', // '/library/:strCategory/page:intPage',
'/fenlei/:strCategory/page:intPage', // '/fenlei/:strCategory/page:intPage',
'/class/:strCategory/page:intPage', // '/class/:strCategory/page:intPage',
'/category/:strCategory/page:intPage', // '/category/:strCategory/page:intPage',
/** /**
* kuangyu 模板 * kuangyu 模板
@@ -155,6 +158,13 @@ $arrRoutes = [
'/fenlei/:strGender/:strCategory/:strStatus/page:intPage', '/fenlei/:strGender/:strCategory/:strStatus/page:intPage',
'/class/:strGender/:strCategory/:strStatus/page:intPage', '/class/:strGender/:strCategory/:strStatus/page:intPage',
'/category/:strGender/:strCategory/:strStatus/page:intPage', '/category/:strGender/:strCategory/:strStatus/page:intPage',
// '/shuku/:strGender/page:intPage',
// '/books/:strGender/page:intPage',
// '/library/:strGender/page:intPage',
// '/fenlei/:strGender/page:intPage',
// '/class/:strGender/page:intPage',
// '/category/:strGender/page:intPage',
], ],
// 书库首页 // 书库首页
'library-index' => [ 'library-index' => [
@@ -267,11 +277,14 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
return view($strView); return view($strView);
}) })
->pattern([ ->pattern([
// 'strGender' => '[a-z\-]+', 'strGender' => '[a-z\-]*', // 允许空值
'strCategory' => '[a-z\-]+', 'strCategory' => '[a-z\-]*', // 允许空值
'strStatus' => 'all|lianzai|wanjie', 'strStatus' => '(all|lianzai|wanjie)?', // 允许空值
// 'strOrder' => '[a-z\-]+', 'strOrder' => '[a-z\-]*', // 允许空值
'intPage' => '\d+' 'intPage' => '\d*', // 允许空值
// 'strCategory' => 'all|xuanhuan-xiuzhen|junshi-xiaoshuo|wangyou-xiaoshuo|kehuan-xiaoshuo|zhongsheng-chuanyue|dushi-xiaoshuo|lingyi-xiaoshuo|yanqing-xiaoshuo|qita-xiaoshuo',
]); ]);
break; break;
@@ -305,7 +318,7 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
} }
Route::get($strRoute, function () use ($strView) { Route::get($strRoute, function () use ($strView) {
return view($strView); return view($strView);
})->append(['strChannel' => 'boys']); })->append(['strChannel' => 'man']);
//Route::get($strRoute, [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => $boolIsMobile, 'strChannel' => 'boys']); //Route::get($strRoute, [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => $boolIsMobile, 'strChannel' => 'boys']);
break; break;
@@ -318,7 +331,7 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
} }
Route::get($strRoute, function () use ($strView) { Route::get($strRoute, function () use ($strView) {
return view($strView); return view($strView);
})->append(['strChannel' => 'girls']); })->append(['strChannel' => 'women']);
//Route::get($strRoute, [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => $boolIsMobile, 'strChannel' => 'girls']); //Route::get($strRoute, [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => $boolIsMobile, 'strChannel' => 'girls']);
break; break;

View File

@@ -4,6 +4,43 @@
{block name="keywords"}{site:replace code="NOVEL@GETLIBRARY@KEYWORDS"}{/block} {block name="keywords"}{site:replace code="NOVEL@GETLIBRARY@KEYWORDS"}{/block}
{block name="description"}{site:replace code="NOVEL@GETLIBRARY@DESCRIPTION"}{/block} {block name="description"}{site:replace code="NOVEL@GETLIBRARY@DESCRIPTION"}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content='{site:replace code="NOVEL@GETLIBRARY@TITLE"}' />
<meta property="og:description" content='{site:replace code="NOVEL@GETLIBRARY@DESCRIPTION"}' />
{if $Request.route.strGender == 'all' && $Request.route.strCategory == 'all' && $Request.route.strStatus == 'all'}
<meta property="og:url" content="https://{$DomainModel->d_domain}{$strCategoryIndexUrlTemp}" />
{else}
<meta property="og:url"
content='https://{$DomainModel->d_domain}{site:nflurl category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}' />
{/if}
<meta property="og:type" content="book" />
<!-- 结构化数据 -->
{if $Request.route.strGender == 'all' && $Request.route.strCategory == 'all' && $Request.route.strStatus == 'all'}
<script type="application/ld+json">
{
"@context": "https://{$DomainModel->d_domain}{$strCategoryIndexUrlTemp}",
"@type": "book",
"headline": '{site:replace code="NOVEL@GETLIBRARY@TITLE"}'
"description": '{site:replace code="NOVEL@GETLIBRARY@DESCRIPTION"}',
"datePublished": "{:date('Y-m-d')}"
}
</script>
{else}
<script type="application/ld+json">
{
"@context": 'https://{$DomainModel->d_domain}{site:nflurl category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}',
"@type": "book",
"headline": '{site:replace code="NOVEL@GETLIBRARY@TITLE"}',
"description": '{site:replace code="NOVEL@GETLIBRARY@DESCRIPTION"}',
"datePublished": "{:date('Y-m-d')}"
}
</script>
{/if}
{/block}
{block name="head-js"}{/block} {block name="head-js"}{/block}
{block name='nav-active-class'}home{/block} {block name='nav-active-class'}home{/block}
{block name="body-class"}novel_home{/block} {block name="body-class"}novel_home{/block}

View File

@@ -35,10 +35,10 @@
<li class=' {if $strPageCode == "home"}on{/if} '> <li class=' {if $strPageCode == "home"}on{/if} '>
<a href="{$strPcPath}/" target="_self" title="首页">首页</a> <a href="{$strPcPath}/" target="_self" title="首页">首页</a>
</li> </li>
<li class=' {if $strPageCode == "boys"}on{/if} '> <li class=' {if $strPageCode == "man"}on{/if} '>
<a href="{$strPcPath}{$strNanUrlTemp}" target="_self" title="男生">男生</a> <a href="{$strPcPath}{$strNanUrlTemp}" target="_self" title="男生">男生</a>
</li> </li>
<li class=' {eq name="strPageCode" value="girls"}on {/eq}'> <li class=' {eq name="strPageCode" value="women"}on {/eq}'>
<a href="{$strPcPath}{$strNvUrlTemp}" target="_self" title="女生">女生</a> <a href="{$strPcPath}{$strNvUrlTemp}" target="_self" title="女生">女生</a>
</li> </li>
<li class=' {eq name="strPageCode" value="library"}on {/eq}'> <li class=' {eq name="strPageCode" value="library"}on {/eq}'>

View File

@@ -1,54 +1,71 @@
{extend name="baseH5" /} {extend name="baseH5" /}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block} {block name="title"}{site:replace code="NOVEL@GETLIBRARY@TITLE"}{/block}
{block name="description"}{$strDescription??''}{/block} {block name="keywords"}{site:replace code="NOVEL@GETLIBRARY@KEYWORDS"}{/block}
{block name="description"}{site:replace code="NOVEL@GETLIBRARY@DESCRIPTION"}{/block}
{block name="head"} {block name="head"}
<!-- 社交媒体标签 --> <!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" /> <meta property="og:title" content='{site:replace code="NOVEL@GETLIBRARY@TITLE"}' />
<meta property="og:description" content="{$strDescription??''}" /> <meta property="og:description" content='{site:replace code="NOVEL@GETLIBRARY@DESCRIPTION"}' />
{if $strGender == 'all' && $strCategory == 'all' && $strStatus == 'all'} {if $Request.route.strGender == 'all' && $Request.route.strCategory == 'all' && $Request.route.strStatus == 'all'}
<meta property="og:url" content="https://{$DomainModel->d_domain}{$strCategoryIndexUrlTemp}" /> <meta property="og:url" content="https://{$DomainModel->d_domain}{$strCategoryIndexUrlTemp}" />
{else} {else}
<meta property="og:url"
content='https://{$DomainModel->d_domain}{site:nflurl gender="$strGender" category="$strCategory" status="$strStatus" page="$intPage"/}' />
{/if}
<meta property="og:url"
content='https://{$DomainModel->d_domain}{site:nflurl gender="$Request.route.strGender" category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}' />
{/if}
<meta property="og:type" content="book" /> <meta property="og:type" content="book" />
<!-- 结构化数据 --> <!-- 结构化数据 -->
{if $strGender == 'all' && $strCategory == 'all' && $strStatus == 'all'} {if $Request.route.strGender == 'all' && $Request.route.strCategory == 'all' && $Request.route.strStatus == 'all'}
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://{$DomainModel->d_domain}{$strCategoryIndexUrlTemp}", "@context": "https://{$DomainModel->d_domain}{$strCategoryIndexUrlTemp}",
"@type": "book", "@type": "book",
"headline": "{$strTitle??''}", "headline": '{site:replace code="NOVEL@GETLIBRARY@TITLE"}',
"description": "{$strDescription??''}", "description": '{site:replace code="NOVEL@GETLIBRARY@DESCRIPTION"}',
"datePublished": "{:date('Y-m-d')}" "datePublished": "{:date('Y-m-d')}"
} }
</script> </script>
{else} {else}
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://{$DomainModel->d_domain}{site:nflurl gender="$strGender" category="$strCategory" status="$strStatus" page="$intPage"/}", "@context": 'https://{$DomainModel->d_domain}{site:nflurl gender="$Request.route.strGender" category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}',
"@type": "book", "@type": "book",
"headline": "{$strTitle??''}", "headline": '{site:replace code="NOVEL@GETLIBRARY@TITLE"}',
"description": "{$strDescription??''}", "description": '{site:replace code="NOVEL@GETLIBRARY@DESCRIPTION"}',
"datePublished": "{:date('Y-m-d')}" "datePublished": "{:date('Y-m-d')}"
} }
</script> </script>
{/if} {/if}
{/block} {/block}
{block name="head-js"}{/block} {block name="head-js"}{/block}
{block name="logo-html"} {block name="logo-html"}
<h1 class="logo"> <h1 class="logo">
<a href="/">{$DomainModel->d_name}-{$strNovelSex}{$strSearchCategory}{$strSearchStatus}免费阅读</a> <a href="/">{$DomainModel->d_name}-{$Request.route.strGender}{$Request.route.strCategory}{$Request.route.strStatus}免费阅读</a>
</h1> </h1>
{/block} {/block}
{block name="strPageCode"}
<?php $strPageCode = 'library'; ?>
{/block}
{block name="main"} {block name="main"}
{novel:pagerexp page="$Request.get.page" limit="30"
n_category="$Request.route.strCategory"
n_sex="$Request.route.strGender"
n_status="$Request.route.strStatus"
d_key="d_key"
button_num="10" cache_life="86400" func="generateCategoryPager" export_name="resData" /}
{site:grm page_code="pc_novel_library" diff="$resData.p_data.page" num="70" g_key="arrGrm" /}
<div class="wrap"> <div class="wrap">
<p class="site-description">{$strDescription??''}</p> <p class="site-description">{site:replace code="NOVEL@GETLIBRARY@DESCRIPTION"}</p>
<nav class="breadcrumb" aria-label="breadcrumb"> <nav class="breadcrumb" aria-label="breadcrumb">
<ol itemscope itemtype="https://schema.org/BreadcrumbList"> <ol itemscope itemtype="https://schema.org/BreadcrumbList">
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"> <li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
@@ -70,16 +87,16 @@
<div class="mod mod-nav"> <div class="mod mod-nav">
<div id="book-nav" class="book-nav"> <div id="book-nav" class="book-nav">
<ul class="clearfix"> <ul class="clearfix">
<li class='{eq name="strGender" value="all"}on {/eq}'> <li class='{eq name="$Request.route.strGender" value="all"}on {/eq} {eq name="$Request.route.strGender" value=""}on {/eq}'>
<a href='{site:nflurl gender="all" category="$strCategory" status="$strStatus" page="$intPage"/}' <a href='{site:nflurl gender="all" category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
title="全部">全部</a> title="全部">全部</a>
</li> </li>
<li class='{eq name="strGender" value="$strNanUrl"}on {/eq}'> <li class='{eq name="$Request.route.strGender" value="$strNanUrl"}on {/eq}'>
<a href='{site:nflurl gender="$strNanUrlTemp" category="$strCategory" status="$strStatus" page="$intPage"/}' <a href='{site:nflurl gender="$strNanUrl" category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
title="男生">男生</a> title="男生">男生</a>
</li> </li>
<li class='{eq name="strGender" value="$strNvUrl"}on {/eq}'> <li class='{eq name="$Request.route.strGender" value="$strNvUrl"}on {/eq}'>
<a href='{site:nflurl gender="$strNvUrlTemp" category="$strCategory" status="$strStatus" page="$intPage"/}' <a href='{site:nflurl gender="$strNvUrl" category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
title="女生">女生</a> title="女生">女生</a>
</li> </li>
</ul> </ul>
@@ -87,39 +104,35 @@
<div id="book-nav" class="book-nav"> <div id="book-nav" class="book-nav">
<ul class="clearfix"> <ul class="clearfix">
<li class='{eq name="strCategory" value="all"}on {/eq}'> <li class='{eq name="$Request.route.strCategory" value="all"}on {/eq} {eq name="$Request.route.strCategory" value=""}on {/eq}'>
<a href='{site:nflurl gender="$strGender" category="all" status="$strStatus" page="$intPage"/}' <a href='{site:nflurl gender="$Request.route.strGender" category="all" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
btn="search_category">全部</a> btn="search_category">全部</a>
</li> </li>
{eq name="strGender" value="all"} {if $Request.route.strGender == "all" || $Request.route.strGender == ""}
{foreach $arrCategoryAll.man as $key=>$vo } {novel:category d_key="strCategoryPinyin" d_val="strCategoryName"}
<li class='{eq name="key" value="$strCategory"}on {/eq}'> <li class='{eq name="strCategoryPinyin" value="$Request.route.strCategory"}on {/eq}'>
<a href='{site:nflurl gender="$strGender" category="$key" status="$strStatus" page="$intPage"/}' <a href='{site:nflurl gender="$Request.route.strGender" category="$strCategoryPinyin" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
btn="search_category">{$vo}</a> btn="search_category">{$strCategoryName}</a>
</li> </li>
{/foreach} {/novel:category}
{foreach $arrCategoryAll.women as $key=>$vo } {/if}
<li class='{eq name="key" value="$strCategory"}on {/eq}'>
<a href='{site:nflurl gender="$strGender" category="$key" status="$strStatus" page="$intPage"/}' {eq name="$Request.route.strGender" value="$strNanUrl"}
btn="search_category">{$vo}</a> {novel:category d_key="strCategoryPinyin" d_val="strCategoryName" n_sex="man"}
<li class='{eq name="strCategoryPinyin" value="$Request.route.strCategory"}on {/eq}'>
<a href='{site:nflurl gender="$Request.route.strGender" category="$strCategoryPinyin" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
btn="search_category">{$strCategoryName}</a>
</li> </li>
{/foreach} {/novel:category}
{/eq} {/eq}
{eq name="strGender" value="$strNanUrl"}
{foreach $arrCategoryAll.women as $key=>$vo } {eq name="$Request.route.strGender" value="$strNvUrl"}
<li class='{eq name="key" value="$strCategory"}on {/eq}'> {novel:category d_key="strCategoryPinyin" d_val="strCategoryName" n_sex="women"}
<a href='{site:nflurl gender="$strGender" category="$key" status="$strStatus" page="$intPage"/}' <li class='{eq name="strCategoryPinyin" value="$Request.route.strCategory"}on {/eq}'>
btn="search_category">{$vo}</a> <a href='{site:nflurl gender="$Request.route.strGender" category="$strCategoryPinyin" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
btn="search_category">{$strCategoryName}</a>
</li> </li>
{/foreach} {/novel:category}
{/eq}
{eq name="strGender" value="$strNvUrl"}
{foreach $arrCategoryAll.women as $key=>$vo }
<li class='{eq name="key" value="$strCategory"}on {/eq}'>
<a href='{site:nflurl gender="$strGender" category="$key" status="$strStatus" page="$intPage"/}'
btn="search_category">{$vo}</a>
</li>
{/foreach}
{/eq} {/eq}
@@ -127,16 +140,16 @@
</div> </div>
<div id="book-nav" class="book-nav"> <div id="book-nav" class="book-nav">
<ul class="clearfix"> <ul class="clearfix">
<li class='{eq name="strStatus" value="all"}on {/eq}'> <li class='{eq name="$Request.route.strStatus" value="all"}on {/eq} {eq name="$Request.route.strStatus" value=""}on {/eq}'>
<a href='{site:nflurl gender="$strGender" category="$strCategory" status="all" page="$intPage"/}' <a href={site:nflurl gender="$Request.route.strGender" category="$Request.route.strCategory" status="all" page="$Request.route.intPage"/}'
btn="search_category">全部</a> btn="search_category">全部</a>
</li> </li>
<li class='{eq name="strStatus" value="lianzai"}on {/eq}'> <li class='{eq name="$Request.route.strStatus" value="lianzai"}on {/eq}'>
<a href='{site:nflurl gender="$strGender" category="$strCategory" status="lianzai" page="$intPage"/}' <a href={site:nflurl gender="$Request.route.strGender" category="$Request.route.strCategory" status="lianzai" page="$Request.route.intPage"/}'
btn="search_category">连载</a> btn="search_category">连载</a>
</li> </li>
<li class='{eq name="strStatus" value="wanjie"}on {/eq}'> <li class='{eq name="$Request.route.strStatus" value="wanjie"}on {/eq}'>
<a href='{site:nflurl gender="$strGender" category="$strCategory" status="wanjie" page="$intPage"/}' <a href={site:nflurl gender="$Request.route.strGender" category="$Request.route.strCategory" status="wanjie" page="$Request.route.intPage"/}'
btn="search_category">完本</a> btn="search_category">完本</a>
</li> </li>
</ul> </ul>
@@ -145,7 +158,7 @@
<div class="mod new-book"> <div class="mod new-book">
<div class="book-list"> <div class="book-list">
<ul class="clearfix"> <ul class="clearfix">
{volist name="arrNovel" id="Novel" key="key"} {volist name="$resData.data" id="Novel" key="key"}
{include file="public/novelListH" start="0"/} {include file="public/novelListH" start="0"/}
{/volist} {/volist}
</ul> </ul>
@@ -153,17 +166,17 @@
<div class="pages"> <div class="pages">
<ul class="pager"> <ul class="pager">
{volist name="arrPaginator" id="vo" key="k"} {volist name="$resData.p_data.pager" id="vo" key="k"}
{switch $vo.label} {switch $vo.label}
{case value="上一页"} {case value="上一页"}
{if $intPage == 1} {if $resData.p_data.page == 1}
<li class="disabled"><span>«</span></li> <li class="disabled"><span>«</span></li>
{else} {else}
<li><a href="{$vo.url}">«</a></li> <li><a href="{$vo.url}">«</a></li>
{/if} {/if}
{/case} {/case}
{case value="下一页"} {case value="下一页"}
{if $intPage >= $intTotalPage} {if $resData.p_data.page >= $resData.p_data.total}
<li class="disabled"><span>»</span></li> <li class="disabled"><span>»</span></li>
{else} {else}
<li><a href="{$vo.url}">»</a></li> <li><a href="{$vo.url}">»</a></li>

View File

@@ -1,22 +1,28 @@
{extend name="baseH5" /} {extend name="baseH5" /}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block} {block name="title"}{site:replace code="NOVEL@GETNOVELCHANNEL@TITLE"}{/block}
{block name="description"}{$strDescription??''}{/block} {block name="keywords"}{site:replace code="NOVEL@GETNOVELCHANNEL@KEYWORDS"}{/block}
{block name="description"}{site:replace code="NOVEL@GETNOVELCHANNEL@DESCRIPTION"}{/block}
{block name="head"} {block name="head"}
<?php
$strPageCode = $Request->param('strChannel');
?>
<!-- 社交媒体标签 --> <!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" /> <meta property="og:title" content='{site:replace code="NOVEL@GETNOVELCHANNEL@TITLE"}' />
<meta property="og:description" content="{$strDescription??''}" /> <meta property="og:description" content='{site:replace code="NOVEL@GETNOVELCHANNEL@DESCRIPTION"}' />
<meta property="og:url" <meta property="og:url"
content="https://{$DomainModel->d_domain}{$strPageCode == 'boys' ? $strNanUrlTemp : $strNvUrlTemp }" /> content="https://{$DomainModel->d_domain}{$strPageCode == 'man' ? $strNanUrlTemp : $strNvUrlTemp }" />
<meta property="og:type" content="book" /> <meta property="og:type" content="book" />
<!-- 结构化数据 --> <!-- 结构化数据 -->
<script type="application/ld+json"> <script type="application/ld+json">
{ {
@context": "https://schema.org”, @context": "https://schema.org”,
"@type": "book", "@type": "book",
"headline": "{$strTitle??''}", "headline": '{site:replace code="NOVEL@GETNOVELCHANNEL@TITLE"}',
"description": "{$strDescription??''}", "description": '{site:replace code="NOVEL@GETNOVELCHANNEL@DESCRIPTION"}',
"url": "https://{$DomainModel->d_domain}/{$strPageCode == 'boys' ? $strNanUrlTemp : $strNvUrlTemp }", "url": "https://{$DomainModel->d_domain}/{$strPageCode == 'man' ? $strNanUrlTemp : $strNvUrlTemp }",
"datePublished": "{:date('Y-m-d')}" "datePublished": "{:date('Y-m-d')}"
} }
</script> </script>
@@ -25,7 +31,7 @@
{block name="logo-html"} {block name="logo-html"}
<h1 class="logo"> <h1 class="logo">
{eq name="strPageCode" value="boys"} {eq name="strPageCode" value="man"}
<a href="/">{$DomainModel->d_name}-男生小说免费阅读</a> <a href="/">{$DomainModel->d_name}-男生小说免费阅读</a>
{else} {else}
<a href="/">{$DomainModel->d_name}-女生小说免费阅读</a> <a href="/">{$DomainModel->d_name}-女生小说免费阅读</a>
@@ -34,10 +40,13 @@
{/block} {/block}
{block name="main"} {block name="main"}
{site:grm page_code="pc_index" diff="0" num="50" g_key="arrGrm" /}
<!--wrap--> <!--wrap-->
<div class="wrap"> <div class="wrap">
<p class="site-description">{$strDescription??''}</p> <p class="site-description">{site:replace code="NOVEL@GETNOVELCHANNEL@DESCRIPTION"}</p>
<nav class="breadcrumb" aria-label="breadcrumb"> <nav class="breadcrumb" aria-label="breadcrumb">
<ol itemscope itemtype="https://schema.org/BreadcrumbList"> <ol itemscope itemtype="https://schema.org/BreadcrumbList">
@@ -48,7 +57,7 @@
<meta itemprop="position" content="1" /> <meta itemprop="position" content="1" />
</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">
{eq name="strPageCode" value="boys"} {eq name="strPageCode" value="man"}
<a href="{$strNanUrlTemp}" itemprop="item"> <a href="{$strNanUrlTemp}" itemprop="item">
<span itemprop="name">男生</span> <span itemprop="name">男生</span>
</a> </a>
@@ -69,9 +78,9 @@
</div> </div>
<div class="book-slide"> <div class="book-slide">
<ul class="clearfix"> <ul class="clearfix">
{volist name="arrRecommendSerializationNovel" id="Novel" key="key"} {novel:list count="8" sort_type="tuijian" n_status="lianzai" n_sex="$strPageCode" d_key="key" d_val="Novel" p_val="page_data" cache_life="86400"}
{include file="public/novelListS" start="0"/} {include file="public/novelListS" start="0"/}
{/volist} {/novel:list}
</ul> </ul>
</div> </div>
</div> </div>
@@ -81,9 +90,9 @@
</div> </div>
<div class="book-slide"> <div class="book-slide">
<ul class="clearfix"> <ul class="clearfix">
{volist name="arrRecommendEndNovel" id="Novel" key="key"} {novel:list count="8" sort_type="tuijian" n_status="wanjie" n_sex="$strPageCode" d_key="key" d_val="Novel" p_val="page_data" cache_life="86400"}
{include file="public/novelListS" start="13"/} {include file="public/novelListS" start="13"/}
{/volist} {/novel:list}
</ul> </ul>
</div> </div>
</div> </div>
@@ -93,9 +102,9 @@
</div> </div>
<div class="book-list"> <div class="book-list">
<ul class="clearfix"> <ul class="clearfix">
{volist name="arrNewsUpdateNovel" id="Novel" key="key"} {novel:list count="8" sort_type="update" n_sex="$strPageCode" d_key="key" d_val="Novel" p_val="page_data" cache_life="86400"}
{include file="public/novelListH" start="21"/} {include file="public/novelListH" start="21"/}
{/volist} {/novel:list}
</ul> </ul>
</div> </div>
</div> </div>

View File

@@ -1,11 +1,13 @@
{extend name="baseH5" /} {extend name="baseH5" /}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block} {block name="title"}{site:replace code="NOVEL@GETNOVELRANK@TITLE"}{/block}
{block name="description"}{$strDescription??''}{/block} {block name="keywords"}{site:replace code="NOVEL@GETNOVELRANK@KEYWORDS"}{/block}
{block name="description"}{site:replace code="NOVEL@GETNOVELRANK@DESCRIPTION"}{/block}
{block name="head"} {block name="head"}
<!-- 社交媒体标签 --> <!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" /> <meta property="og:title" content='{site:replace code="NOVEL@GETNOVELRANK@TITLE"}' />
<meta property="og:description" content="{$strDescription??''}" /> <meta property="og:description" content='{site:replace code="NOVEL@GETNOVELRANK@DESCRIPTION"}' />
<meta property="og:url" content="https://{$DomainModel->d_domain}/paihang/all" /> <meta property="og:url" content="https://{$DomainModel->d_domain}/paihang/all" />
<meta property="og:type" content="book" /> <meta property="og:type" content="book" />
<!-- 结构化数据 --> <!-- 结构化数据 -->
@@ -13,8 +15,8 @@
{ {
"@context": "https://{$DomainModel->d_domain}/paihang/all", "@context": "https://{$DomainModel->d_domain}/paihang/all",
"@type": "book", "@type": "book",
"headline": "{$strTitle??''}", "headline": '{site:replace code="NOVEL@GETNOVELRANK@TITLE"}',
"description": "{$strDescription??''}", "description": '{site:replace code="NOVEL@GETNOVELRANK@DESCRIPTION"}',
"datePublished": "{:date('Y-m-d')}" "datePublished": "{:date('Y-m-d')}"
} }
</script> </script>
@@ -27,9 +29,17 @@
</h1> </h1>
{/block} {/block}
{block name="strPageCode"}
<?php $strPageCode = 'rank'; ?>
{/block}
{block name="main"} {block name="main"}
{site:grm page_code="h5_rank" diff="0" num="100" g_key="arrGrm" /}
<div class="wrap"> <div class="wrap">
<p class="site-description">{$strDescription??''}</p> <p class="site-description">{site:replace code="NOVEL@GETNOVELRANK@DESCRIPTION"}</p>
<nav class="breadcrumb" aria-label="breadcrumb"> <nav class="breadcrumb" aria-label="breadcrumb">
<ol itemscope itemtype="https://schema.org/BreadcrumbList"> <ol itemscope itemtype="https://schema.org/BreadcrumbList">
@@ -53,7 +63,7 @@
</div> </div>
<div class="top-index"> <div class="top-index">
<ul class="clearfix"> <ul class="clearfix">
{volist name="arrDayRankNovel" id="Novel" key="key"} {novel:list count="10" sort_type="news" d_key="key" d_val="Novel" cache_life="86400"}
{if $key == 1} {if $key == 1}
{include file="public/novelListH" start="0"/} {include file="public/novelListH" start="0"/}
{/if} {/if}
@@ -61,7 +71,7 @@
{include file="public/novelListRank" start="1"/} {include file="public/novelListRank" start="1"/}
{/if} {/if}
{/volist} {/novel:list}
</ul> </ul>
</div> </div>
</div> </div>
@@ -72,7 +82,7 @@
</div> </div>
<div class="top-index"> <div class="top-index">
<ul class="clearfix"> <ul class="clearfix">
{volist name="arrWeekRankNovel" id="Novel" key="key"} {novel:list count="10" sort_type="news" d_key="key" d_val="Novel" cache_life="86400"}
{if $key == 1} {if $key == 1}
{include file="public/novelListH" start="10"/} {include file="public/novelListH" start="10"/}
{/if} {/if}
@@ -80,7 +90,7 @@
{include file="public/novelListRank" start="11"/} {include file="public/novelListRank" start="11"/}
{/if} {/if}
{/volist} {/novel:list}
</ul> </ul>
</div> </div>
</div> </div>
@@ -91,7 +101,7 @@
</div> </div>
<div class="top-index"> <div class="top-index">
<ul class="clearfix"> <ul class="clearfix">
{volist name="arrMoonRankNovel" id="Novel" key="key"} {novel:list count="10" sort_type="news" d_key="key" d_val="Novel" cache_life="86400"}
{if $key == 1} {if $key == 1}
{include file="public/novelListH" start="20"/} {include file="public/novelListH" start="20"/}
{/if} {/if}
@@ -99,7 +109,7 @@
{include file="public/novelListRank" start="21"/} {include file="public/novelListRank" start="21"/}
{/if} {/if}
{/volist} {/novel:list}
</ul> </ul>
</div> </div>
</div> </div>
@@ -110,14 +120,14 @@
</div> </div>
<div class="top-index"> <div class="top-index">
<ul class="clearfix"> <ul class="clearfix">
{volist name="arrTotalRankNovel" id="Novel" key="key"} {novel:list count="10" sort_type="news" d_key="key" d_val="Novel" cache_life="86400"}
{if $key == 1} {if $key == 1}
{include file="public/novelListH" start="30"/} {include file="public/novelListH" start="30"/}
{/if} {/if}
{if $key >= 2} {if $key >= 2}
{include file="public/novelListRank" start="31"/} {include file="public/novelListRank" start="31"/}
{/if} {/if}
{/volist} {/novel:list}
</ul> </ul>
</div> </div>
</div> </div>
@@ -128,14 +138,14 @@
</div> </div>
<div class="top-index"> <div class="top-index">
<ul class="clearfix"> <ul class="clearfix">
{volist name="arrNewsNovelRankNovel" id="Novel" key="key"} {novel:list count="10" sort_type="news" d_key="key" d_val="Novel" cache_life="86400"}
{if $key == 1} {if $key == 1}
{include file="public/novelListH" start="40"/} {include file="public/novelListH" start="40"/}
{/if} {/if}
{if $key >= 2} {if $key >= 2}
{include file="public/novelListRank" start="41"/} {include file="public/novelListRank" start="41"/}
{/if} {/if}
{/volist} {/novel:list}
</ul> </ul>
</div> </div>
</div> </div>
@@ -146,14 +156,14 @@
</div> </div>
<div class="top-index"> <div class="top-index">
<ul class="clearfix"> <ul class="clearfix">
{volist name="arrEdnNovelRankNovel" id="Novel" key="key"} {novel:list count="10" sort_type="news" d_key="key" d_val="Novel" cache_life="86400"}
{if $key == 1} {if $key == 1}
{include file="public/novelListH" start="50"/} {include file="public/novelListH" start="50"/}
{/if} {/if}
{if $key >= 2} {if $key >= 2}
{include file="public/novelListRank" start="51"/} {include file="public/novelListRank" start="51"/}
{/if} {/if}
{/volist} {/novel:list}
</ul> </ul>
</div> </div>
</div> </div>

View File

@@ -6,8 +6,8 @@
{block name="head"} {block name="head"}
<!-- 社交媒体标签 --> <!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" /> <meta property="og:title" content='{site:replace code="NOVEL@GETLIBRARY@TITLE"}' />
<meta property="og:description" content="{$strDescription??''}" /> <meta property="og:description" content='{site:replace code="NOVEL@GETLIBRARY@DESCRIPTION"}' />
{if $Request.route.strGender == 'all' && $Request.route.strCategory == 'all' && $Request.route.strStatus == 'all'} {if $Request.route.strGender == 'all' && $Request.route.strCategory == 'all' && $Request.route.strStatus == 'all'}
<meta property="og:url" content="https://{$DomainModel->d_domain}{$strCategoryIndexUrlTemp}" /> <meta property="og:url" content="https://{$DomainModel->d_domain}{$strCategoryIndexUrlTemp}" />
{else} {else}
@@ -22,8 +22,8 @@
{ {
"@context": "https://{$DomainModel->d_domain}{$strCategoryIndexUrlTemp}", "@context": "https://{$DomainModel->d_domain}{$strCategoryIndexUrlTemp}",
"@type": "book", "@type": "book",
"headline": "{$strTitle??''}", "headline": '{site:replace code="NOVEL@GETLIBRARY@TITLE"}',
"description": "{$strDescription??''}", "description": '{site:replace code="NOVEL@GETLIBRARY@DESCRIPTION"}',
"datePublished": "{:date('Y-m-d')}" "datePublished": "{:date('Y-m-d')}"
} }
</script> </script>
@@ -32,8 +32,8 @@
{ {
"@context": 'https://{$DomainModel->d_domain}{site:nflurl gender="$Request.route.strGender" category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}', "@context": 'https://{$DomainModel->d_domain}{site:nflurl gender="$Request.route.strGender" category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}',
"@type": "book", "@type": "book",
"headline": "{$strTitle??''}", "headline": '{site:replace code="NOVEL@GETLIBRARY@TITLE"}',
"description": "{$strDescription??''}", "description": '{site:replace code="NOVEL@GETLIBRARY@DESCRIPTION"}',
"datePublished": "{:date('Y-m-d')}" "datePublished": "{:date('Y-m-d')}"
} }
</script> </script>
@@ -60,6 +60,10 @@
</h2> </h2>
{/block} {/block}
{block name="strPageCode"}
<?php $strPageCode = 'library'; ?>
{/block}
{block name="main"} {block name="main"}
{novel:pagerexp page="$Request.get.page" limit="30" {novel:pagerexp page="$Request.get.page" limit="30"
@@ -91,16 +95,19 @@ button_num="10" cache_life="86400" func="generateCategoryPager" export_name="res
<div class="find"> <div class="find">
<div class="opt"> <div class="opt">
<div class="optCl" mod="search_channel"> <div class="optCl" mod="search_channel">
6
{$Request.route.strGender}
5
<span class="optTit">所属频道</span> <span class="optTit">所属频道</span>
<ul> <ul>
<li><a class='{eq name="$Request.route.strGender" value="all"}on {/eq}' <li><a class='{eq name="$Request.route.strGender" value="all"}on {/eq} {eq name="$Request.route.strGender" value=""}on {/eq}'
href='{$strPcPath}{site:nflurl gender="all" category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}' href='{$strPcPath}{site:nflurl gender="all" category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
btn="search_category">全部</a></li> btn="search_category">全部</a></li>
<li><a class='{eq name="$Request.route.strGender" value="$strNanUrl"}on {/eq}' <li><a class='{eq name="$Request.route.strGender" value="$strNanUrl"}on {/eq}'
href='{$strPcPath}{site:nflurl gender="$strNanUrlTemp" category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}' href='{$strPcPath}{site:nflurl gender="$strNanUrl" category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
btn="search_category">男生</a></li> btn="search_category">男生</a></li>
<li><a class='{eq name="$Request.route.strGender" value="$strNvUrl"}on {/eq}' <li><a class='{eq name="$Request.route.strGender" value="$strNvUrl"}on {/eq}'
href='{$strPcPath}{site:nflurl gender="$strNvUrlTemp" category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}' href='{$strPcPath}{site:nflurl gender="$strNvUrl" category="$Request.route.strCategory" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
btn="search_category">女生</a></li> btn="search_category">女生</a></li>
</ul> </ul>
@@ -108,41 +115,42 @@ button_num="10" cache_life="86400" func="generateCategoryPager" export_name="res
<div class="optCl" mod="search_channel"> <div class="optCl" mod="search_channel">
<span class="optTit">所属分类</span> <span class="optTit">所属分类</span>
<ul> <ul>
<li><a class='{eq name="$Request.route.strCategory" value="all"}on {/eq}' <li>
<a class='{eq name="$Request.route.strCategory" value="all"}on {/eq} {eq name="$Request.route.strCategory" value=""}on {/eq}'
href='{$strPcPath}{site:nflurl gender="$Request.route.strGender" category="all" status="$Request.route.strStatus" page="$Request.route.intPage"/}' href='{$strPcPath}{site:nflurl gender="$Request.route.strGender" category="all" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
btn="search_category">全部</a></li> btn="search_category">全部</a>
{eq name="$Request.route.strGender" value="all"} </li>
{foreach $arrCategoryAll.man as $key=>$vo } {if $Request.route.strGender == "all" || $Request.route.strGender == ""}
<li><a class='{eq name="key" value="$Request.route.strCategory"}on {/eq}' {novel:category d_key="strCategoryPinyin" d_val="strCategoryName"}
href='{$strPcPath}{site:nflurl gender="$Request.route.strGender" category="$key" status="$Request.route.strStatus" page="$Request.route.intPage"/}' <li>
btn="search_category">{$vo}</a></li> <a class='{eq name="strCategoryPinyin" value="$Request.route.strCategory"}on {/eq}'
{/foreach} href='{$strPcPath}{site:nflurl gender="$Request.route.strGender" category="$strCategoryPinyin" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
{foreach $arrCategoryAll.women as $key=>$vo } btn="search_category">{$strCategoryName}</a>
<li><a class='{eq name="key" value="$Request.route.strCategory"}on {/eq}' </li>
href='{$strPcPath}{site:nflurl gender="$Request.route.strGender" category="$key" status="$Request.route.strStatus" page="$Request.route.intPage"/}' {/novel:category}
btn="search_category">{$vo}</a></li> {/if}
{/foreach}
{/eq}
{eq name="$Request.route.strGender" value="$strNanUrl"} {eq name="$Request.route.strGender" value="$strNanUrl"}
{foreach $arrCategoryAll.man as $key=>$vo } {novel:category d_key="strCategoryPinyin" d_val="strCategoryName" n_sex="man"}
<li><a class='{eq name="key" value="$Request.route.strCategory"}on {/eq}' <li><a class='{eq name="strCategoryPinyin" value="$Request.route.strCategory"}on {/eq}'
href='{$strPcPath}{site:nflurl gender="$Request.route.strGender" category="$key" status="$Request.route.strStatus" page="$Request.route.intPage"/}' href='{$strPcPath}{site:nflurl gender="$Request.route.strGender" category="$strCategoryPinyin" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
btn="search_category">{$vo}</a></li> btn="search_category">{$strCategoryName}</a></li>
{/foreach} {/novel:category}
{/eq} {/eq}
{eq name="$Request.route.strGender" value="$strNvUrl"} {eq name="$Request.route.strGender" value="$strNvUrl"}
{foreach $arrCategoryAll.women as $key=>$vo } {novel:category d_key="strCategoryPinyin" d_val="strCategoryName" n_sex="women"}
<li><a class='{eq name="key" value="$Request.route.strCategory"}on {/eq}' <li><a class='{eq name="strCategoryPinyin" value="$Request.route.strCategory"}on {/eq}'
href='{$strPcPath}{site:nflurl gender="$Request.route.strGender" category="$key" status="$Request.route.strStatus" page="$Request.route.intPage"/}' href='{$strPcPath}{site:nflurl gender="$Request.route.strGender" category="$strCategoryPinyin" status="$Request.route.strStatus" page="$Request.route.intPage"/}'
btn="search_category">{$vo}</a></li> btn="search_category">{$strCategoryName}</a></li>
{/foreach} {/novel:category}
{/eq} {/eq}
</ul> </ul>
</div> </div>
<div class="optCl"> <div class="optCl">
<span class="optTit">是否完结</span> <span class="optTit">是否完结</span>
<ul> <ul>
<li><a class='{eq name="$Request.route.strStatus" value="all"}on {/eq}' <li><a class='{eq name="$Request.route.strStatus" value="all"}on {/eq} {eq name="$Request.route.strStatus" value=""}on {/eq}'
href='{$strPcPath}{site:nflurl gender="$Request.route.strGender" category="$Request.route.strCategory" status="all" page="$Request.route.intPage"/}' href='{$strPcPath}{site:nflurl gender="$Request.route.strGender" category="$Request.route.strCategory" status="all" page="$Request.route.intPage"/}'
btn="search_category">全部</a></li> btn="search_category">全部</a></li>
<li><a class='{eq name="$Request.route.strStatus" value="lianzai"}on {/eq}' <li><a class='{eq name="$Request.route.strStatus" value="lianzai"}on {/eq}'
@@ -160,24 +168,24 @@ button_num="10" cache_life="86400" func="generateCategoryPager" export_name="res
<!--搜索结果 开始--> <!--搜索结果 开始-->
<div class="result" mod="search_data_list"> <div class="result" mod="search_data_list">
<ul> <ul>
{volist name="resData.data" id="Novel" key="d_key"} {volist name="$resData.data" id="Novel" key="key"}
{include file="pc/public/shukuNovelList" start="0"/} {include file="pc/public/shukuNovelList" start="0"/}
{/volist} {/volist}
</ul> </ul>
<!--页码切换 开始--> <!--页码切换 开始-->
<div class="changepage"> <div class="changepage">
<ul class="pagination"> <ul class="pagination">
{volist name="resData.p_data.pager" id="vo" key="k"} {volist name="$resData.p_data.pager" id="vo" key="k"}
{switch $vo.label} {switch $vo.label}
{case value="上一页"} {case value="上一页"}
{if $Request.route.intPage == 1} {if $resData.p_data.page == 1}
<span>«</span> <li class="disabled"><span>«</span></li>
{else} {else}
<a href="{$vo.url}">«</a> <a href="{$vo.url}">«</a>
{/if} {/if}
{/case} {/case}
{case value="下一页"} {case value="下一页"}
{if $Request.route.intPage >= resData.p_data.total} {if $resData.p_data.page >= $resData.p_data.total}
<li class="disabled"><span>»</span></li> <li class="disabled"><span>»</span></li>
{else} {else}
<li><a href="{$strPcPath}{$vo.url}">»</a></li> <li><a href="{$strPcPath}{$vo.url}">»</a></li>

View File

@@ -1,28 +1,42 @@
{extend name="basePc" /} {extend name="basePc" /}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block} {block name="title"}{site:replace code="NOVEL@GETNOVELCHANNEL@TITLE"}{/block}
{block name="description"}{$strDescription??''}{/block} {block name="keywords"}{site:replace code="NOVEL@GETNOVELCHANNEL@KEYWORDS"}{/block}
{block name="description"}{site:replace code="NOVEL@GETNOVELCHANNEL@DESCRIPTION"}{/block}
{block name="strPageCode"}
<?php $strPageCode = $Request->param('strChannel'); ?>
{/block}
{block name="head"} {block name="head"}
<?php
$strPageCode = $Request->param('strChannel');
?>
<!-- 社交媒体标签 --> <!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" /> <meta property="og:title" content='{site:replace code="NOVEL@GETNOVELCHANNEL@TITLE"}' />
<meta property="og:description" content="{$strDescription??''}" /> <meta property="og:description" content='{site:replace code="NOVEL@GETNOVELCHANNEL@DESCRIPTION"}' />
<meta property="og:url" content="https://{$DomainModel->d_domain}{$strPageCode == 'boys' ? $strNanUrlTemp : $strNvUrlTemp }" /> <meta property="og:url"
content="https://{$DomainModel->d_domain}{$strPageCode == 'man' ? $strNanUrlTemp : $strNvUrlTemp }" />
<meta property="og:type" content="book" /> <meta property="og:type" content="book" />
<!-- 结构化数据 --> <!-- 结构化数据 -->
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://{$DomainModel->d_domain}{$strPageCode == 'boys' ? $strNanUrlTemp : $strNvUrlTemp }", @context": "https://schema.org”,
"@type": "book", "@type": "book",
"headline": "{$strTitle??''}", "headline": '{site:replace code="NOVEL@GETNOVELCHANNEL@TITLE"}',
"description": "{$strDescription??''}", "description": '{site:replace code="NOVEL@GETNOVELCHANNEL@DESCRIPTION"}',
"url": "https://{$DomainModel->d_domain}/{$strPageCode == 'man' ? $strNanUrlTemp : $strNvUrlTemp }",
"datePublished": "{:date('Y-m-d')}" "datePublished": "{:date('Y-m-d')}"
} }
</script> </script>
{/block} {/block}
{block name="head-css"} {block name="head-css"}
{eq name="strPageCode" value="boys"} {eq name="strPageCode" value="man"}
<link rel="canonical" href="https://{$DomainModel->d_domain}/{$strNanUrlTemp}"> <link rel="canonical" href="https://{$DomainModel->d_domain}/{$strNanUrlTemp}">
{else} {else}
<link rel="canonical" href="https://{$DomainModel->d_domain}/{$strNvUrlTemp}"> <link rel="canonical" href="https://{$DomainModel->d_domain}/{$strNvUrlTemp}">
@@ -38,9 +52,10 @@
</a> </a>
</h2> </h2>
{/block} {/block}
{block name="main"} {block name="main"}
{site:grm page_code="pc_index" diff="0" num="50" g_key="arrGrm" /}
<div class="content"> <div class="content">
@@ -53,7 +68,7 @@
<meta itemprop="position" content="1" /> <meta itemprop="position" content="1" />
</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">
{eq name="strPageCode" value="boys"} {eq name="strPageCode" value="man"}
<a href="{$strPcPath}{$strNanUrlTemp}" itemprop="item"> <a href="{$strPcPath}{$strNanUrlTemp}" itemprop="item">
<span itemprop="name">男生</span> <span itemprop="name">男生</span>
</a> </a>
@@ -75,15 +90,13 @@
<span class="log_line"></span> <span class="log_line"></span>
</div> </div>
<ul class="f2_list" mod="hot_tj"> <ul class="f2_list" mod="hot_tj">
{volist name="arrRecommendSerializationNovel" id="Novel" key="key"} {novel:list count="12" sort_type="tuijian" n_status="lianzai" n_sex="$strPageCode" d_key="key" d_val="Novel" p_val="page_data" cache_life="86400"}
{include file="pc/public/endNovelList" start="0"/} {include file="pc/public/endNovelList" start="0"/}
{/volist} {/novel:list}
</ul> </ul>
</div> </div>
<div class="adv"> <div class="adv">
{volist name="arrAdBanner" id="Ad" key="key"}
{include file="pc/public/adBanner" /}
{/volist}
</div> </div>
@@ -95,16 +108,15 @@
<h2>完本推荐</h2> <h2>完本推荐</h2>
</div> </div>
<ul class="rec_R"> <ul class="rec_R">
{volist name="arrRecommendEndNovel" id="Novel" key="key"} {novel:list count="8" sort_type="tuijian" n_status="wanjie" n_sex="$strPageCode" d_key="key" d_val="Novel" p_val="page_data" cache_life="86400"}
{include file="pc/public/endNovelList" start="13"/} {include file="pc/public/endNovelList" start="13"/}
{/volist} {/novel:list}
</ul> </ul>
</div> </div>
<div class="adv"> <div class="adv">
{volist name="arrAdBanner" id="Ad" key="key"}
{include file="pc/public/adBanner" /}
{/volist}
</div> </div>
<div class="f4 area"> <div class="f4 area">
@@ -125,9 +137,9 @@
<li class="sj">更新时间</li> <li class="sj">更新时间</li>
</ul> </ul>
</li> </li>
{volist name="arrNewsUpdateNovel" id="Novel" key="key"} {novel:list count="30" sort_type="update" n_sex="$strPageCode" d_key="key" d_val="Novel" p_val="page_data" cache_life="86400"}
{include file="pc/public/indexNewsUpdateList" start="21"/} {include file="pc/public/indexNewsUpdateList" start="21"/}
{/volist} {/novel:list}
</ol> </ol>
</div> </div>
</div> </div>

View File

@@ -1,24 +1,27 @@
{extend name="basePc" /} {extend name="basePc" /}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block} {block name="title"}{site:replace code="NOVEL@GETNOVELRANK@TITLE"}{/block}
{block name="description"}{$strDescription??''}{/block} {block name="keywords"}{site:replace code="NOVEL@GETNOVELRANK@KEYWORDS"}{/block}
{block name="description"}{site:replace code="NOVEL@GETNOVELRANK@DESCRIPTION"}{/block}
{block name="head"} {block name="head"}
<!-- 社交媒体标签 --> <!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" /> <meta property="og:title" content='{site:replace code="NOVEL@GETNOVELRANK@TITLE"}' />
<meta property="og:description" content="{$strDescription??''}" /> <meta property="og:description" content='{site:replace code="NOVEL@GETNOVELRANK@DESCRIPTION"}' />
<meta property="og:url" content="https://{$DomainModel->d_domain}{$strRankUrlTemp}" /> <meta property="og:url" content="https://{$DomainModel->d_domain}/paihang/all" />
<meta property="og:type" content="article" /> <meta property="og:type" content="book" />
<!-- 结构化数据 --> <!-- 结构化数据 -->
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://{$DomainModel->d_domain}{$strRankUrlTemp}", "@context": "https://{$DomainModel->d_domain}/paihang/all",
"@type": "NewsArticle", "@type": "book",
"headline": "{$strTitle??''}", "headline": '{site:replace code="NOVEL@GETNOVELRANK@TITLE"}',
"description": "{$strDescription??''}", "description": '{site:replace code="NOVEL@GETNOVELRANK@DESCRIPTION"}',
"datePublished": "{:date('Y-m-d')}" "datePublished": "{:date('Y-m-d')}"
} }
</script> </script>
{/block} {/block}
{block name="head-css"} {block name="head-css"}
<link rel="canonical" href="https://{$DomainModel->d_domain}{$strRankUrlTemp}"> <link rel="canonical" href="https://{$DomainModel->d_domain}{$strRankUrlTemp}">
{/block} {/block}
@@ -31,7 +34,15 @@
</a> </a>
</h2> </h2>
{/block} {/block}
{block name="strPageCode"}
<?php $strPageCode = 'rank'; ?>
{/block}
{block name="main"} {block name="main"}
{site:grm page_code="h5_rank" diff="0" num="100" g_key="arrGrm" /}
<div class="content content_back"> <div class="content content_back">
<nav class="breadcrumb" aria-label="breadcrumb"> <nav class="breadcrumb" aria-label="breadcrumb">
@@ -49,11 +60,7 @@
</li> </li>
</ol> </ol>
</nav> </nav>
<!--大标题 开始-->
<!-- <div class="rank_bt">
<a href="{$strPcPath}/rank.html" class="all_btn">完整榜单</a>
</div> -->
<!--大标题 结束-->
<!--各种榜单 开始--> <!--各种榜单 开始-->
<div class="ki_li"> <div class="ki_li">
<div class="com_R"> <div class="com_R">
@@ -63,14 +70,14 @@
<div class="list_wrap"> <div class="list_wrap">
<div class="swi"> <div class="swi">
<ol class="list" mod="rank_data_list"> <ol class="list" mod="rank_data_list">
{foreach $arrDayRankNovel as $key=>$Novel} {novel:list count="10" sort_type="news" d_key="key" d_val="Novel" cache_life="86400"}
{if $key == 0} {if $key == 0}
{include file="pc/public/indexBoyRankOne" start="0"/} {include file="pc/public/indexBoyRankOne" start="0"/}
{/if} {/if}
{if $key >= 1} {if $key >= 1}
{include file="pc/public/indexBoyRankList" start="1"/} {include file="pc/public/indexBoyRankList" start="1"/}
{/if} {/if}
{/foreach} {/novel:list}
</ol> </ol>
</div> </div>
<!-- <span class="more"> <!-- <span class="more">
@@ -87,14 +94,14 @@
<div class="list_wrap"> <div class="list_wrap">
<div class="swi"> <div class="swi">
<ol class="list" mod="rank_data_list"> <ol class="list" mod="rank_data_list">
{foreach $arrWeekRankNovel as $key=>$Novel} {novel:list count="10" sort_type="news" d_key="key" d_val="Novel" cache_life="86400"}
{if $key == 0} {if $key == 0}
{include file="pc/public/indexBoyRankOne" start="10"/} {include file="pc/public/indexBoyRankOne" start="10"/}
{/if} {/if}
{if $key >= 1} {if $key >= 1}
{include file="pc/public/indexBoyRankList" start="11"/} {include file="pc/public/indexBoyRankList" start="11"/}
{/if} {/if}
{/foreach} {/novel:list}
</ol> </ol>
</div> </div>
<!-- <span class="more"> <!-- <span class="more">
@@ -111,14 +118,14 @@
<div class="list_wrap"> <div class="list_wrap">
<div class="swi"> <div class="swi">
<ol class="list" mod="rank_data_list"> <ol class="list" mod="rank_data_list">
{foreach $arrMoonRankNovel as $key=>$Novel} {novel:list count="10" sort_type="news" d_key="key" d_val="Novel" cache_life="86400"}
{if $key == 0} {if $key == 0}
{include file="pc/public/indexBoyRankOne" start="20"/} {include file="pc/public/indexBoyRankOne" start="20"/}
{/if} {/if}
{if $key >= 1} {if $key >= 1}
{include file="pc/public/indexBoyRankList" start="21"/} {include file="pc/public/indexBoyRankList" start="21"/}
{/if} {/if}
{/foreach} {/novel:list}
</ol> </ol>
</div> </div>
<!-- <span class="more"> <!-- <span class="more">
@@ -135,14 +142,14 @@
<div class="list_wrap"> <div class="list_wrap">
<div class="swi"> <div class="swi">
<ol class="list" mod="rank_data_list"> <ol class="list" mod="rank_data_list">
{foreach $arrTotalRankNovel as $key=>$Novel} {novel:list count="10" sort_type="news" d_key="key" d_val="Novel" cache_life="86400"}
{if $key == 0} {if $key == 0}
{include file="pc/public/indexBoyRankOne" start="30"/} {include file="pc/public/indexBoyRankOne" start="30"/}
{/if} {/if}
{if $key >= 1} {if $key >= 1}
{include file="pc/public/indexBoyRankList" start="31"/} {include file="pc/public/indexBoyRankList" start="31"/}
{/if} {/if}
{/foreach} {/novel:list}
</ol> </ol>
</div> </div>
<!-- <span class="more"> <!-- <span class="more">
@@ -159,14 +166,14 @@
<div class="list_wrap"> <div class="list_wrap">
<div class="swi"> <div class="swi">
<ol class="list" mod="rank_data_list"> <ol class="list" mod="rank_data_list">
{foreach $arrNewsNovelRankNovel as $key=>$Novel} {novel:list count="10" sort_type="news" d_key="key" d_val="Novel" cache_life="86400"}
{if $key == 0} {if $key == 0}
{include file="pc/public/indexBoyRankOne" start="40"/} {include file="pc/public/indexBoyRankOne" start="40"/}
{/if} {/if}
{if $key >= 1} {if $key >= 1}
{include file="pc/public/indexBoyRankList" start="41"/} {include file="pc/public/indexBoyRankList" start="41"/}
{/if} {/if}
{/foreach} {/novel:list}
</ol> </ol>
</div> </div>
<!-- <span class="more"> <!-- <span class="more">
@@ -183,14 +190,14 @@
<div class="list_wrap"> <div class="list_wrap">
<div class="swi"> <div class="swi">
<ol class="list" mod="rank_data_list"> <ol class="list" mod="rank_data_list">
{foreach $arrEdnNovelRankNovel as $key=>$Novel} {novel:list count="10" sort_type="news" d_key="key" d_val="Novel" cache_life="86400"}
{if $key == 0} {if $key == 0}
{include file="pc/public/indexBoyRankOne" start="50"/} {include file="pc/public/indexBoyRankOne" start="50"/}
{/if} {/if}
{if $key >= 1} {if $key >= 1}
{include file="pc/public/indexBoyRankList" start="51"/} {include file="pc/public/indexBoyRankList" start="51"/}
{/if} {/if}
{/foreach} {/novel:list}
</ol> </ol>
</div> </div>
<!-- <span class="more"> <!-- <span class="more">

View File

@@ -287,7 +287,7 @@ button_num="10" cache_life="86400" func="generateCategoryPager" export_name="res
</li> </li>
{novel:list count="30" sort_type="update" d_key="d_key" d_val="Novel" {novel:list count="30" sort_type="update" d_key="d_key" d_val="Novel"
p_val="page_data" cache_life="86400"} p_val="page_data" cache_life="86400"}
{include file="pc/public/indexNewsUpdateList" start="95"/} {include file="pc/public/indexNewsUpdateList" start="70"/}
{/novel:list} {/novel:list}
</ol> </ol>
</div> </div>

View File

@@ -5,7 +5,7 @@
<a href='{$strPcPath}{site:nflurl gender="all" category="$Novel.n_category_pinyin" status="all" page="1"/}' >{$Novel->n_category ?? ''}</a></li> <a href='{$strPcPath}{site:nflurl gender="all" category="$Novel.n_category_pinyin" status="all" page="1"/}' >{$Novel->n_category ?? ''}</a></li>
<li class="sm"> <li class="sm">
<h3> <h3>
{$arrGrm[$d_key+[start]]|raw} {$arrGrm[$key+[start]]|raw}
<a href='{$strPcPath}{site:nurl n_id="$Novel->n_id" n_py="$Novel->n_name_pinyin"/}' title="{$Novel.n_name ?? ''}" > <a href='{$strPcPath}{site:nurl n_id="$Novel->n_id" n_py="$Novel->n_name_pinyin"/}' title="{$Novel.n_name ?? ''}" >
{$Novel.n_name ?? ''}</a> {$Novel.n_name ?? ''}</a>
</h3> </h3>

View File

@@ -158,10 +158,10 @@ class NovelService
{ {
$strKey = 'CATEGORY_INFO_URL'; $strKey = 'CATEGORY_INFO_URL';
$strUrl = $this->getPageUrl($strKey, [ $strUrl = $this->getPageUrl($strKey, [
'strGender' => $strGender ?? '', 'strGender' => $strGender ?? 'all',
'strCategory' => $strCategory ?? '', 'strCategory' => $strCategory ?? 'all',
'strStatus' => $strStatus ?? '', 'strStatus' => $strStatus ?? 'all',
'strOrder' => $strOrder ?? '', 'strOrder' => $strOrder ?? 'all',
'intPage' => $intPage ?? 1, 'intPage' => $intPage ?? 1,
]); ]);
$strUrl = preg_replace('#/{2,}#', '/', $strUrl); $strUrl = preg_replace('#/{2,}#', '/', $strUrl);
@@ -234,11 +234,18 @@ class NovelService
* *
* @return array * @return array
*/ */
public function getCategoryFilter(): array public function getCategoryFilter(string $n_sex=''): array
{ {
if($n_sex == 'man'){
return CategoryModel::$arrCategoryAll['man'];
}else if($n_sex == 'women'){
return CategoryModel::$arrCategoryAll['women'];
}else{
return array_combine(CategoryModel::$arrCategoryPinYin, CategoryModel::$arrCategory); return array_combine(CategoryModel::$arrCategoryPinYin, CategoryModel::$arrCategory);
} }
}
/** /**
* 获取小说数据 * 获取小说数据
* *

View File

@@ -14,7 +14,7 @@ class Novel extends TagLib
'sort' => ['attr' => 'd_key,d_val'], 'sort' => ['attr' => 'd_key,d_val'],
'status' => ['attr' => 'd_key,d_val'], 'status' => ['attr' => 'd_key,d_val'],
'sex' => ['attr' => 'd_key,d_val'], 'sex' => ['attr' => 'd_key,d_val'],
'category' => ['attr' => 'd_key,d_val'], 'category' => ['attr' => 'd_key,d_val,n_sex'],
]; ];
private function customBuildVar($mixedArgs) private function customBuildVar($mixedArgs)
@@ -309,10 +309,13 @@ EOT;
$d_key = $tag['d_key'] ?? 'd_key'; $d_key = $tag['d_key'] ?? 'd_key';
$d_val = $tag['d_val'] ?? 'd_val'; $d_val = $tag['d_val'] ?? 'd_val';
$n_sex = $tag['n_sex'] ?? '';
$n_sex = $this->customBuildVar($n_sex);
$strParse = <<<EOT $strParse = <<<EOT
<?php <?php
\$arrCategory = app(\\app\\services\\NovelService::class)->getCategoryFilter(); \$arrCategory = app(\\app\\services\\NovelService::class)->getCategoryFilter( {$n_sex});
if (!empty(\$arrCategory) && is_array(\$arrCategory)): if (!empty(\$arrCategory) && is_array(\$arrCategory)):

View File

@@ -207,11 +207,11 @@ EOD;
*/ */
public function tagNFLUrl($tag) public function tagNFLUrl($tag)
{ {
$strGender = isset($tag['gender']) ? $tag['gender'] : ''; $strGender = isset($tag['gender']) ? $tag['gender'] : 'all';
$strCategory = isset($tag['category']) ? $tag['category'] : ''; $strCategory = isset($tag['category']) ? $tag['category'] : 'all';
$strStatus = isset($tag['status']) ? $tag['status'] : ''; $strStatus = isset($tag['status']) ? $tag['status'] : 'all';
$strOrder = isset($tag['order']) ? $tag['order'] : ''; $strOrder = isset($tag['order']) ? $tag['order'] : 'all';
$intPage = isset($tag['page']) ? $tag['page'] : ''; $intPage = isset($tag['page']) ? $tag['page'] : 1;
$strGender = $this->customBuildVar($strGender); $strGender = $this->customBuildVar($strGender);
$strCategory = $this->customBuildVar($strCategory); $strCategory = $this->customBuildVar($strCategory);

View File

@@ -90,7 +90,7 @@
$d_key ?? 'd_key'; # 查询出来的数据遍历的时候, 下标键变量的名称 $d_key ?? 'd_key'; # 查询出来的数据遍历的时候, 下标键变量的名称
$d_val ?? 'd_val'; # 查询出来的数据遍历的时候, 值的名称 $d_val ?? 'd_val'; # 查询出来的数据遍历的时候, 值的名称
# 样例 # 样例
{novel:list count="10" n_category="$Request.route.category" d_key="d_key" d_val="novel" p_val="page_data" cache_life="1000"} {novel:list count="10" n_category="$Request.route.category" d_key="d_key" d_val="novel" cache_life="1000"}
<li> <li>
Index: {$d_key} Index: {$d_key}
Title: {$novel.n_name} Title: {$novel.n_name}