PC 端 页面 head
This commit is contained in:
@@ -126,9 +126,7 @@ function incShouCangFun(intId) {
|
||||
function addBookshelfFun(NovelInfo) {
|
||||
|
||||
if (!NovelInfo) {
|
||||
NovelInfo = JSON.parse(arrNovel)
|
||||
NovelInfo['c_sort_num'] = strChapterSort;
|
||||
NovelInfo['c_name'] = strChapterName;
|
||||
NovelInfo = arrNovel
|
||||
}
|
||||
|
||||
let arrBookshelf = JSON.parse(localStorage.getItem('strBookshelfKey')) || [];
|
||||
@@ -251,17 +249,14 @@ function displayBookshelf() {
|
||||
|
||||
// 加入阅读记录
|
||||
function addHistoryFun(NovelInfo) {
|
||||
|
||||
// 如果没有传入 NovelInfo,则使用 arrNovel 并补充字段
|
||||
if (!NovelInfo) {
|
||||
NovelInfo = JSON.parse(arrNovel);
|
||||
NovelInfo['c_sort_num'] = strChapterSort;
|
||||
NovelInfo['c_name'] = strChapterName;
|
||||
NovelInfo = arrNovel
|
||||
|
||||
}
|
||||
|
||||
// 获取本地存储中的历史记录
|
||||
let arrBookshelf = JSON.parse(localStorage.getItem('strHistoryKey')) || [];
|
||||
|
||||
// 检查书籍是否已存在
|
||||
const index = arrBookshelf.findIndex(item => item.n_id === NovelInfo.n_id);
|
||||
|
||||
@@ -379,7 +374,7 @@ function displayHistory() {
|
||||
// 方法1:使用 fetch API
|
||||
async function reportStats(data) {
|
||||
try {
|
||||
const response = await fetch('http://api.novel2.com/publish', {
|
||||
const response = await fetch(strPushApi+'/publish', {
|
||||
method: 'POST',
|
||||
// mode: 'no-cors', // 添加这行
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user