Fix initReader: Use parseFloat instead of parseInt to support decimal chapters
This commit is contained in:
parent
f8dcd3c280
commit
4c808b131e
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user