-
-
-
-
{/block}
{block name="customize"}
diff --git a/code/app/services/NovelService.php b/code/app/services/NovelService.php
index ff9e4e0..6038c9a 100644
--- a/code/app/services/NovelService.php
+++ b/code/app/services/NovelService.php
@@ -729,6 +729,7 @@ class NovelService
'strNovelDescription' => $arrNovel['n_description'],
]);
$arrNovel['intFirstChapterSort'] = $intFirstChapterSort;
+ $arrNovel['arrLatestChapter'] = $arrLatestChapter;
$arrNovel['arrNovelClicks'] = $arrNovelClicks;
$arrNovel['arrRelateveNovel'] = $arrRelateveNovel;
$arrNovel['strFocus'] = $strFocus;
diff --git a/code/app/services/SiteContext.php b/code/app/services/SiteContext.php
index 010514e..9162e48 100644
--- a/code/app/services/SiteContext.php
+++ b/code/app/services/SiteContext.php
@@ -312,10 +312,14 @@ class SiteContext
{
$strOrder = $this->Request->param('strOrder');
$strStatus = $this->Request->param('strStatus');
+ $strNovelOrder = '';
+ if(!empty($strOrder) && $strOrder != 'all'){
+ $strNovelOrder = StaticConfig::$arrNovelRankSortType[$strOrder];
+ }
ConverterMovel::setVal([
'intPage' => 1,
- 'strNovelOrder' => StaticConfig::$arrNovelRankSortType[$strOrder],
- 'strNovelStatus' => StaticConfig::$arrNovelStatus[$strStatus],
+ 'strNovelOrder' => $strNovelOrder,
+ 'strNovelStatus' => empty($strStatus) ? "" : StaticConfig::$arrNovelStatus[$strStatus],
]);
}
}
diff --git a/code/extend/template/taglib/Novel.php b/code/extend/template/taglib/Novel.php
index 3f5aea0..3db2203 100644
--- a/code/extend/template/taglib/Novel.php
+++ b/code/extend/template/taglib/Novel.php
@@ -12,6 +12,7 @@ class Novel extends TagLib
'pagerexp' => ['attr' => 'page,limit,n_category,sort_type,n_status,n_sex,key,diff_key,cache_life,d_key,d_val,p_val,func,export_name', 'close' => 0],
'info' => ['attr' => 'n_id,n_forge_id,n_key', 'close' => 0],
'sort' => ['attr' => 'd_key,d_val'],
+ 'ranksort' => ['attr' => 'd_key,d_val'],
'status' => ['attr' => 'd_key,d_val'],
'sex' => ['attr' => 'd_key,d_val'],
'category' => ['attr' => 'd_key,d_val,n_sex'],
@@ -281,7 +282,39 @@ EOT;
$strParse = <<
arrSortType;
+\$arrSort = app(\\app\\services\\StaticConfig::class)::\$arrNovelSortType;
+
+if (!empty(\$arrSort) && is_array(\$arrSort)):
+
+?>
+EOT;
+ $strParse .= << \${$d_val}): ?>
+EOT;
+ $strParse .= $content;
+ $strParse .= <<
+
+EOT;
+ return $strParse;
+ }
+
+ /**
+ * 获取排序筛选参数
+ *
+ * @param array $tag
+ * @param string $content
+ * @return string
+ */
+ public function tagRankSort($tag, $content)
+ {
+
+ $d_key = $tag['d_key'] ?? 'd_key';
+ $d_val = $tag['d_val'] ?? 'd_val';
+
+ $strParse = <<arrStatus;
+\$arrStatus = app(\\app\\services\\StaticConfig::class)::\$arrNovelStatus;
if (!empty(\$arrStatus) && is_array(\$arrStatus)):
@@ -346,7 +379,7 @@ EOT;
$strParse = <<arrSex;
+\$arrSex = app(\\app\\services\\StaticConfig::class)::\$arrNovelSex;
if (!empty(\$arrSex) && is_array(\$arrSex)):
diff --git a/code/public/template/default/h5/css/style.css b/code/public/template/default/h5/css/style.css
index 22930e1..78b2647 100644
--- a/code/public/template/default/h5/css/style.css
+++ b/code/public/template/default/h5/css/style.css
@@ -226,6 +226,7 @@ c{clear: both;display: none;}
.page_num a{height:34px;line-height: 35px;padding: 0 15px;display: block;margin: 0;box-sizing: border-box;background: #dcebcd;
color: #004d00;border-radius:5px;transition: all 0.3s;}
.page_num a:hover{background: #004d00;color:#fff}
+
.habt{font-size: 14px;font-weight: normal;color: #F44336;}
.dvfd{background: #fff;width: 200px;height: 140px;position: absolute;top: 50%;left: 50%;margin-top: -70px;margin-left: -100px;box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);text-align: center;border-radius: 5px;z-index: 99999;position: fixed;}
diff --git a/code/public/template/shikong/css/search.css b/code/public/template/shikong/css/search.css
index 208a4dd..4ab77ff 100644
--- a/code/public/template/shikong/css/search.css
+++ b/code/public/template/shikong/css/search.css
@@ -10,6 +10,7 @@ body {
.search-home {
padding: 10px 20px 20px;
color: #fff;
+ background: #161313;
}
.search-form {
@@ -217,4 +218,9 @@ body {
}
/* .s-footer-tel , .footer-box{
color:#fff
-} */
\ No newline at end of file
+} */
+
+.novel_search_page .title-h1{
+ text-align: center;
+ font-size: 0.2rem;
+}
\ No newline at end of file
diff --git a/code/public/template/shikong/css/style.css b/code/public/template/shikong/css/style.css
index 52ec241..bb6fb33 100644
--- a/code/public/template/shikong/css/style.css
+++ b/code/public/template/shikong/css/style.css
@@ -141,7 +141,7 @@ body .bg-top-pink-minheight{
.detail-info{
}
-.detail-title-xiangqing h1{
+.detail-title-xiangqing h2{
font-family: PingFang SC;
font-style: normal;
font-weight: 600;
@@ -242,4 +242,92 @@ margin-right: 0.1rem;
color: #B2B2B2;
line-height: 20px;
width: 100%;
-}
\ No newline at end of file
+}
+.site-description {
+ font-size: 0.3rem;
+ padding: 0.1rem 0.1rem;
+ line-height: 0.6rem;
+ background: #ffffff;
+ margin-bottom: 0.2rem;
+ text-align: center;
+}
+
+
+
+
+/* 面包屑容器 -----------------------------start */
+
+/* 面包屑容器 */
+.breadcrumb {
+ font-family: Arial, sans-serif;
+ padding: 10px 15px;
+ background-color: #f8f9fa;
+ border-radius: 5px;
+ margin: 10px 0;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
+}
+
+/* 有序列表样式 */
+.breadcrumb ol {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+}
+
+/* 面包屑项 */
+.breadcrumb-item {
+ font-size: 14px;
+ color: #666;
+}
+
+/* 链接样式 */
+.breadcrumb-item a {
+ text-decoration: none;
+ color: #007bff;
+ transition: color 0.3s ease;
+}
+
+.breadcrumb-item a:hover {
+ color: #0056b3;
+ text-decoration: underline;
+}
+
+/* 分隔符 */
+.breadcrumb-item + .breadcrumb-item::before {
+ content: ">";
+ margin: 0 8px;
+ color: #999;
+ font-weight: bold;
+}
+
+/* 当前页面样式 */
+.breadcrumb-item.active {
+ color: #333;
+ font-weight: bold;
+}
+
+/* 响应式调整 */
+@media (max-width: 768px) {
+ .breadcrumb {
+ padding: 8px 10px;
+ }
+ .breadcrumb-item {
+ font-size: 12px;
+ }
+ .breadcrumb-item + .breadcrumb-item::before {
+ margin: 0 5px;
+ }
+}
+
+
+/* 面包屑容器 -----------------------------end */
+
+
+.page_num{text-align: center;font-size: 14px;box-sizing: border-box;padding: 10px;width: 330px;margin: 0 auto;display: flex;}
+.page_num select{padding: 0 10px;height: 34px;line-height: 35px;box-sizing: border-box;border: 1px solid #7d9465;background: #fff;border-radius: 5px;margin: 0 10px;width: 140px;cursor: pointer;}
+.page_num a{height:34px;line-height: 35px;padding: 0 15px;display: block;margin: 0;box-sizing: border-box;background: #dcebcd;
+color: #004d00;border-radius:5px;transition: all 0.3s;}
+.page_num a:hover{background: #004d00;color:#fff}
\ No newline at end of file
diff --git a/code/public/template/shikong/js/index-247463.js b/code/public/template/shikong/js/index-247463.js
index c01cc5f..28ca486 100644
--- a/code/public/template/shikong/js/index-247463.js
+++ b/code/public/template/shikong/js/index-247463.js
@@ -56,31 +56,38 @@ function incShouCangFun(intId){
}
}
+const strBookshelfKey = window.location.hostname + 'strBookshelfKey';
+const strHistoryKey = window.location.hostname + 'strHistoryKey';
+
// 加入书架
function addShujiaFun(NovelInfo){
+
+ if (!NovelInfo) {
+ NovelInfo = arrNovel
+ }
+
+ let arrBookshelf = JSON.parse(localStorage.getItem(strBookshelfKey)) || [];
- // 获取当前书架数据
- let arrShujia = JSON.parse(localStorage.getItem('shujiakey')) || [];
- console.log(arrShujia)
// 检查书籍是否已存在
- const exists = arrShujia.some(item => item.xsxq_id === NovelInfo.xsxq_id);
- if (exists) {
- layerPopup('该书已在书架中!',3)
- return;
+ const index = arrBookshelf.findIndex(item => item.n_id === NovelInfo.n_id);
+
+ if (index !== -1) {
+ // 如果存在,更新该书籍的信息
+ arrBookshelf[index] = { ...arrBookshelf[index], ...NovelInfo };
+ layerPopup('已存在书架中!', 3)
+ } else {
+ // 如果不存在,添加到历史记录
+ arrBookshelf.push(NovelInfo);
+ layerPopup('已成功加入书架!', 3)
}
- // 添加到书架
- arrShujia.push(NovelInfo);
-
// 更新本地存储
- localStorage.setItem('shujiakey', JSON.stringify(arrShujia));
-
- layerPopup('已成功加入书架!',3)
+ localStorage.setItem(strBookshelfKey, JSON.stringify(arrBookshelf));
}
function displayShujia() {
// 获取书架数据
- const shujia = JSON.parse(localStorage.getItem('shujiakey')) || [];
+ const shujia = JSON.parse(localStorage.getItem(strBookshelfKey)) || [];
if (shujia.length === 0) {
console.log('书架为空');
diff --git a/doc/TemplateTag.md b/doc/TemplateTag.md
index ee73851..24ddf51 100644
--- a/doc/TemplateTag.md
+++ b/doc/TemplateTag.md
@@ -101,7 +101,7 @@
$d_key ?? 'd_key'; # 查询出来的数据遍历的时候, 下标键变量的名称
$d_val ?? 'd_val'; # 查询出来的数据遍历的时候, 值的名称
# 样例
-{novel:list count="10" n_category="$Request.route.category" d_key="d_key" d_val="novel" cache_life="1000"}
+{novel:list count="10" n_category="$Request.route.category" d_key="d_key" d_val="Novel" cache_life="1000"}
Index: {$d_key}
Title: {$novel.n_name}
@@ -227,8 +227,19 @@ resData = [
键: {$key} - 值: {$val}
{/novel:sort}
+# 08、获取小说排行榜排序筛选条件
+# 传参与默认值(传参用下面的变量名,名称不需要$符号, 值的话如果用第三方变量作为值,需要带$符号):
+ $d_key ?? 'd_key'; # 查询出来的数据遍历的时候, 下标键变量的名称
+ $d_val ?? 'd_val'; # 查询出来的数据遍历的时候, 值的名称
+# 样例
+{novel:ranksort d_key="key" d_val="val"}
+ 键: {$key} - 值: {$val}
+{/novel:ranksort}
-# 08、获取小说分类筛选条件
+
+
+
+# 09、获取小说分类筛选条件
# 传参与默认值(传参用下面的变量名,名称不需要$符号, 值的话如果用第三方变量作为值,需要带$符号):
$d_key ?? 'd_key'; # 查询出来的数据遍历的时候, 下标键变量的名称
$d_val ?? 'd_val'; # 查询出来的数据遍历的时候, 值的名称
@@ -238,7 +249,7 @@ resData = [
{/novel:category}
-# 09、 获取指定小说多个章节数据并且遍历
+# 10、 获取指定小说多个章节数据并且遍历
# 传参与默认值(传参用下面的变量名,名称不需要$符号, 值的话如果用第三方变量作为值,需要带$符号):
$count ?? '10'; # 查询条数
$n_id ; # 小说ID
@@ -257,7 +268,7 @@ resData = [
{/chapter:list}
-# 10、 获取小说章节详情数据
+# 11、 获取小说章节详情数据
# 传参与默认值(传参用下面的变量名,名称不需要$符号, 值的话如果用第三方变量作为值,需要带$符号):
$n_id ; # 传入的小说ID
$c_sort_num ; # 传入的章节索引
@@ -268,7 +279,7 @@ resData = [
{$arrChapter01.c_name}
-# 11-1、 获取指定小说章节分页数据并且遍历
+# 12-1、 获取指定小说章节分页数据并且遍历
# 传参与默认值(传参用下面的变量名,名称不需要$符号, 值的话如果用第三方变量作为值,需要带$符号):
$page ?? '1'; # 页码
$limit ?? '10'; # 查询条数
@@ -291,7 +302,7 @@ resData = [
{/chapter:pager}
-# 11-2、 获取分页小说章节数据不遍历
+# 12-2、 获取分页小说章节数据不遍历
# 传参与默认值(传参用下面的变量名,名称不需要$符号, 值的话如果用第三方变量作为值,需要带$符号):
$page ?? '1'; # 页码
$limit ?? '10'; # 查询条数
@@ -321,7 +332,7 @@ resData = [
]
{php}var_dump($resData['p_data']);{/php}
-# 12、 获取干扰码
+# 13、 获取干扰码
# 传参与默认值(传参用下面的变量名,名称不需要$符号, 值的话如果用第三方变量作为值,需要带$符号):
$page_code ?? ""; # 页面编码
@@ -332,7 +343,7 @@ resData = [
{php}var_dump($arrGrm);{/php}
-# 13、 获取指定类型小说排行榜并且遍历
+# 14、 获取指定类型小说排行榜并且遍历
# 传参与默认值(传参用下面的变量名,名称不需要$符号, 值的话如果用第三方变量作为值,需要带$符号):
$count ?? '10'; # 查询条数
$sort_type ?? "daily"; # 排序方式:
@@ -361,7 +372,7 @@ resData = [
{/novel:ranklist}
-# 14、 获取随机伪造小说列表并且遍历
+# 15、 获取随机伪造小说列表并且遍历
# 传参与默认值(传参用下面的变量名,名称不需要$符号, 值的话如果用第三方变量作为值,需要带$符号):
$count ?? '10'; # 查询条数
$diff_key ?? ""; # 缓存键值差异
@@ -381,7 +392,7 @@ resData = [
{/site:forgelist}
-# 14、 视图反向控制器(注释函数),在视图开头调用,用来初始化一些操作。这里尽量不要复杂逻辑
+# 16、 视图反向控制器(注释函数),在视图开头调用,用来初始化一些操作。这里尽量不要复杂逻辑
# 传参与默认值(传参用下面的变量名,名称不需要$符号, 值的话如果用第三方变量作为值,需要带$符号):
$func # SiteContext 里面的方法名
@@ -389,7 +400,7 @@ resData = [
{site:helper func="initHomeTKD" /}
-# 15、 获取公共替换变量的值
+# 17、 获取公共替换变量的值
# 传参与默认值(传参用下面的变量名,名称不需要$符号, 值的话如果用第三方变量作为值,需要带$符号):
$code # ConverterMovel 里面的arrMap 的key
# 样例