debug
This commit is contained in:
@@ -10,35 +10,35 @@ return [
|
||||
'description' => '分类书库URL 模板2',
|
||||
'sfg_id' => 39,
|
||||
'arrSubjectFomart' => [
|
||||
'/books/{strGender}/{strCategory}/{strStatus}/page{intPage}',
|
||||
'/books/{strGender}/{strCategory}/{strStatus}/{strOrder}/page{intPage}',
|
||||
]
|
||||
],
|
||||
'CATEGORY_INFO_URL_T3' => [
|
||||
'description' => '分类书库URL 模板3',
|
||||
'sfg_id' => 40,
|
||||
'arrSubjectFomart' => [
|
||||
'/library/{strGender}/{strCategory}/{strStatus}/page{intPage}',
|
||||
'/library/{strGender}/{strCategory}/{strStatus}/{strOrder}/page{intPage}',
|
||||
]
|
||||
],
|
||||
'CATEGORY_INFO_URL_T4' => [
|
||||
'description' => '分类书库URL 模板4',
|
||||
'sfg_id' => 41,
|
||||
'arrSubjectFomart' => [
|
||||
'/fenlei/{strGender}/{strCategory}/{strStatus}/page{intPage}',
|
||||
'/fenlei/{strGender}/{strCategory}/{strStatus}/{strOrder}/page{intPage}',
|
||||
]
|
||||
],
|
||||
'CATEGORY_INFO_URL_T5' => [
|
||||
'description' => '分类书库URL 模板5',
|
||||
'sfg_id' => 42,
|
||||
'arrSubjectFomart' => [
|
||||
'/class/{strGender}/{strCategory}/{strStatus}/page{intPage}',
|
||||
'/class/{strGender}/{strCategory}/{strStatus}/{strOrder}/page{intPage}',
|
||||
]
|
||||
],
|
||||
'CATEGORY_INFO_URL_T6' => [
|
||||
'description' => '分类书库URL 模板6',
|
||||
'sfg_id' => 43,
|
||||
'arrSubjectFomart' => [
|
||||
'/category/{strGender}/{strCategory}/{strStatus}/page{intPage}',
|
||||
'/category/{strGender}/{strCategory}/{strStatus}/{strOrder}/page{intPage}',
|
||||
]
|
||||
],
|
||||
|
||||
@@ -500,35 +500,35 @@ return [
|
||||
'description' => '书库首页URL 模板2',
|
||||
'sfg_id' => 109,
|
||||
'arrSubjectFomart' => [
|
||||
'/books/all',
|
||||
'/books/index',
|
||||
]
|
||||
],
|
||||
'CATEGORY_INDEX_URL_T3' => [
|
||||
'description' => '书库首页URL 模板3',
|
||||
'sfg_id' => 110,
|
||||
'arrSubjectFomart' => [
|
||||
'/library/all',
|
||||
'/library/index',
|
||||
]
|
||||
],
|
||||
'CATEGORY_INDEX_URL_T4' => [
|
||||
'description' => '书库首页URL 模板4',
|
||||
'sfg_id' => 111,
|
||||
'arrSubjectFomart' => [
|
||||
'/fenlei/all',
|
||||
'/fenlei/index',
|
||||
]
|
||||
],
|
||||
'CATEGORY_INDEX_URL_T5' => [
|
||||
'description' => '书库首页URL 模板5',
|
||||
'sfg_id' => 112,
|
||||
'arrSubjectFomart' => [
|
||||
'/class/all',
|
||||
'/class/index',
|
||||
]
|
||||
],
|
||||
'CATEGORY_INDEX_URL_T6' => [
|
||||
'description' => '书库首页URL 模板6',
|
||||
'sfg_id' => 113,
|
||||
'arrSubjectFomart' => [
|
||||
'/category/all',
|
||||
'/category/index',
|
||||
]
|
||||
],
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ c{clear: both;display: none;}
|
||||
.sortChannelG_nav a.on{color:#ff77a5;}
|
||||
.sortChannelP_nav a.on{color:#67c3a6;}
|
||||
|
||||
.sortChannel_nav{padding-left:80px;border-bottom: 1px solid #FBFBFB;}
|
||||
.sortChannel_nav{padding-left:110px;border-bottom: 1px solid #FBFBFB;}
|
||||
.sortChannel_nav a.on{color:#C3C3C3}
|
||||
.sortChannel_nav a.on2{left:45px;color:#03a9f4;}
|
||||
|
||||
@@ -180,7 +180,7 @@ c{clear: both;display: none;}
|
||||
.novel_info .btn-group-cell>.btn-normal.abt3{background: #4CAF50;}
|
||||
.chapter-list li{border-bottom:1px solid #efefef;padding:10px 0px 10px 10px;}
|
||||
.chapter-list li a{display:block;font-size:14px;}
|
||||
.chapter-list span{background:url(list.png) no-repeat scroll 0 0 transparent;display:block;float:right;height:20px;margin-right:10px;margin-top:2px;width:14px;font-family:"宋体"}
|
||||
.chapter-list span{display:block;float:right;height:20px;margin-right:10px;margin-top:2px;width:14px;font-family:"宋体"}
|
||||
|
||||
/* 章节页 */
|
||||
.set{width:100%;height:32px;padding:10px 0px 0px 0px;font-size:12px;clear:both;overflow:hidden;background:#ecf0f0;}
|
||||
@@ -278,7 +278,8 @@ color: #004d00;border-radius:5px;transition: all 0.3s;}
|
||||
.sort_page_num>a{padding:5px 10px; background: #4ab2e6;margin: 5px;color: #fff;display: inline-block;}
|
||||
.sort_page_num>a.prev_off{background:#eee;}
|
||||
.sort_page_num>a:hover,.sort_page_num>a.page_on{background: #3F51B5;}
|
||||
|
||||
.novel_search_page h1{font-size: 1rem;text-align: center;margin-bottom: 1rem;}
|
||||
.novel_search_page h1 span{color:red;}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -150,32 +150,39 @@ function incShouCangFun(intId){
|
||||
}
|
||||
}
|
||||
|
||||
const strBookshelfKey = window.location.hostname + 'strBookshelfKey';
|
||||
|
||||
// 加入书架
|
||||
function addShujiaFun(NovelInfo){
|
||||
function addBookshelfFun(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));
|
||||
localStorage.setItem(strBookshelfKey, JSON.stringify(arrBookshelf));
|
||||
|
||||
layerPopup('已成功加入书架!',3)
|
||||
}
|
||||
|
||||
function displayShujia() {
|
||||
|
||||
// 获取书架数据
|
||||
const shujia = JSON.parse(localStorage.getItem('shujiakey')) || [];
|
||||
const shujia = JSON.parse(localStorage.getItem(strBookshelfKey)) || [];
|
||||
|
||||
if (shujia.length === 0) {
|
||||
console.log('书架为空');
|
||||
|
||||
@@ -1009,7 +1009,7 @@ body {
|
||||
}
|
||||
|
||||
.detail-box .imgbox .flag,.topbar-addfavorite,.topbar-login .btn-submit,.topbar-sethome {
|
||||
background: url("all.gif") no-repeat scroll 0 0 transparent
|
||||
/* background: url("all.gif") no-repeat scroll 0 0 transparent */
|
||||
}
|
||||
|
||||
.topbar {
|
||||
@@ -2813,4 +2813,8 @@ body {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
/* page end */
|
||||
/* page end */
|
||||
|
||||
.novel_search_page h1{font-size: 1rem;text-align: center;margin-bottom: 1rem;}
|
||||
.novel_search_page .search_tip{font-size: 0.8rem;text-align: center;margin-bottom: 1rem;}
|
||||
.novel_search_page h1 span{color:red;}
|
||||
@@ -150,6 +150,8 @@ function incShouCangFun(intId) {
|
||||
}
|
||||
}
|
||||
|
||||
const strBookshelfKey = window.location.hostname + 'strBookshelfKey';
|
||||
|
||||
// 加入书架 addShuJiaFun
|
||||
function addBookshelfFun(NovelInfo) {
|
||||
|
||||
@@ -157,8 +159,8 @@ function addBookshelfFun(NovelInfo) {
|
||||
NovelInfo = arrNovel
|
||||
}
|
||||
|
||||
let arrBookshelf = JSON.parse(localStorage.getItem('strBookshelfKey')) || [];
|
||||
console.log(arrBookshelf)
|
||||
let arrBookshelf = JSON.parse(localStorage.getItem(strBookshelfKey)) || [];
|
||||
|
||||
// 检查书籍是否已存在
|
||||
const index = arrBookshelf.findIndex(item => item.n_id === NovelInfo.n_id);
|
||||
|
||||
@@ -173,15 +175,14 @@ function addBookshelfFun(NovelInfo) {
|
||||
}
|
||||
|
||||
// 更新本地存储
|
||||
localStorage.setItem('strBookshelfKey', JSON.stringify(arrBookshelf));
|
||||
localStorage.setItem(strBookshelfKey, JSON.stringify(arrBookshelf));
|
||||
|
||||
}
|
||||
|
||||
// 删除书架
|
||||
function delBookshelfFun(intNId) {
|
||||
// 获取书架数据
|
||||
const arrHistory = JSON.parse(localStorage.getItem('strBookshelfKey')) || [];
|
||||
console.log(arrHistory)
|
||||
const arrHistory = JSON.parse(localStorage.getItem(strBookshelfKey)) || [];
|
||||
|
||||
// 检查 arrHistory 是否为数组且不为空
|
||||
if (Array.isArray(arrHistory) && arrHistory.length > 0) {
|
||||
@@ -208,7 +209,7 @@ function delBookshelfFun(intNId) {
|
||||
function displayBookshelf() {
|
||||
|
||||
// 获取书架数据
|
||||
const arrBookshelf = JSON.parse(localStorage.getItem('strBookshelfKey')) || [];
|
||||
const arrBookshelf = JSON.parse(localStorage.getItem(strBookshelfKey)) || [];
|
||||
|
||||
if (arrBookshelf.length === 0) {
|
||||
console.log('书架为空');
|
||||
|
||||
Reference in New Issue
Block a user