[skip ci] web: 重构章节内容及其进度

This commit is contained in:
Xwite committed 2023-05-12 21:05:53 +08:00
1 parent ecf93801f9
commit cd0f20c4cf
5 files changed
+183 -167

No files matched your search

+5 -3
View File
@@ -187,7 +187,7 @@ const toDetail = (bookUrl, bookName, bookAuthor, chapterIndex, chapterPos) => {
});
};
onMounted(async () => {
onMounted(() => {
//获取最近阅读书籍
let readingRecentStr = localStorage.getItem("readingRecent");
if (readingRecentStr != null) {
@@ -197,8 +197,10 @@ onMounted(async () => {
}
}
showLoading.value = true;
await store.saveBookProcess();
fetchBookShelfData();
store
.saveBookProgress()
//确保各种网络情况下同步请求先完成
.finally(fetchBookShelfData);
});
const fetchBookShelfData = () => {
API.getBookShelf()