debug
This commit is contained in:
@@ -161,6 +161,7 @@ function addBookshelfFun(NovelInfo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let arrBookshelf = JSON.parse(localStorage.getItem(strBookshelfKey)) || [];
|
let arrBookshelf = JSON.parse(localStorage.getItem(strBookshelfKey)) || [];
|
||||||
|
arrBookshelf = [];
|
||||||
|
|
||||||
// 检查书籍是否已存在
|
// 检查书籍是否已存在
|
||||||
const index = arrBookshelf.findIndex(item => item.n_id === NovelInfo.n_id);
|
const index = arrBookshelf.findIndex(item => item.n_id === NovelInfo.n_id);
|
||||||
@@ -294,6 +295,7 @@ function addHistoryFun(NovelInfo) {
|
|||||||
|
|
||||||
// 获取本地存储中的历史记录
|
// 获取本地存储中的历史记录
|
||||||
let arrBookshelf = JSON.parse(localStorage.getItem(strHistoryKey)) || [];
|
let arrBookshelf = JSON.parse(localStorage.getItem(strHistoryKey)) || [];
|
||||||
|
arrBookshelf = [];
|
||||||
// 检查书籍是否已存在
|
// 检查书籍是否已存在
|
||||||
const index = arrBookshelf.findIndex(item => item.n_id == NovelInfo.n_id);
|
const index = arrBookshelf.findIndex(item => item.n_id == NovelInfo.n_id);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user