This commit is contained in:
make
2025-04-28 17:11:06 +08:00
parent 2958d293d1
commit 4676ae1f16
60 changed files with 369 additions and 181 deletions

View File

@@ -161,6 +161,7 @@ function addBookshelfFun(NovelInfo) {
}
let arrBookshelf = JSON.parse(localStorage.getItem(strBookshelfKey)) || [];
arrBookshelf = []
// 检查书籍是否已存在
const index = arrBookshelf.findIndex(item => item.n_id === NovelInfo.n_id);
@@ -262,6 +263,8 @@ function addHistoryFun(NovelInfo) {
// 获取本地存储中的历史记录
let arrBookshelf = JSON.parse(localStorage.getItem(strHistoryKey)) || [];
arrBookshelf = []
// 检查书籍是否已存在
const index = arrBookshelf.findIndex(item => item.n_id == NovelInfo.n_id);

View File

@@ -225,6 +225,7 @@ function displayBookshelf() {
let strNovelUrl = formatNovelUrl(book.n_name_pinyin, book.n_id)
let strNovelChapterUrl = formatNovelChapterUrl(book.n_name_pinyin, book.n_id, book.c_sort_num)
let strSearchUrl = formatSearchUrl(book.n_author, 1)
console.log(strSearchUrl);
if (isMobile()) {
const bookElement = document.createElement('li');
bookElement.classList.add('book-shelf'); // 添加类名
@@ -268,7 +269,7 @@ function displayBookshelf() {
<a href="${strPcPath}${strNovelChapterUrl}" >${book.c_name}</a>
</td>
<td class="t4">
<a href="${strPcPath}${strSearchUrl}" >${book.n_author}</a>
<a href="${strPcPath}${strNovelUrl}" >${book.n_author}</a>
</td>
<td class="t5">${book.n_update_time}</td>
@@ -395,7 +396,7 @@ function displayHistory() {
<a href="${strPcPath}${strNovelChapterUrl}" >${book.c_name}</a>
</td>
<td class="t4">
<a href="${strPcPath}${strSearchUrl}" >${book.n_author}</a>
<a href="${strPcPath}${strNovelUrl}" >${book.n_author}</a>
</td>
<td class="t5">${book.n_update_time ?? ''}</td>

View File

@@ -162,7 +162,7 @@ body .bg-top-pink-minheight{
align-content: flex-start;
}
.info-btn .jiarushujia{
width: 2.2rem;
width: 30%;
display: inline-block;
text-align: center;