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);