Fix initReader: Use parseFloat instead of parseInt to support decimal chapters

This commit is contained in:
小虾米 2026-03-27 16:48:42 +08:00
parent f8dcd3c280
commit 4c808b131e

View File

@ -332,9 +332,9 @@ async function initReader() {
await loadChaptersData();
}
// 获取章节参数
// 获取章节参数(支持小数章节)
const urlParams = new URLSearchParams(window.location.search);
const chapterId = parseInt(urlParams.get('id')) || 1;
const chapterId = parseFloat(urlParams.get('id')) || 1;
// 加载章节内容
await loadChapter(chapterId);