diff --git a/app/src/main/assets/web/bookshelf.js b/app/src/main/assets/web/bookshelf.js
index 22c8ff87e..c182f49fa 100644
--- a/app/src/main/assets/web/bookshelf.js
+++ b/app/src/main/assets/web/bookshelf.js
@@ -45,15 +45,15 @@ var init = () => {
books.forEach(book => {
let bookDiv = $c("div");
let img = $c("img");
- img.src = book.bookInfoBean.coverUrl || randomImg;
+ img.src = book.coverUrl || randomImg;
img.setAttribute("data-series-num", book.serialNumber);
bookDiv.appendChild(img);
bookDiv.innerHTML += `
- 书名: | ${book.bookInfoBean.name} |
- 作者: | ${book.bookInfoBean.author} |
- 阅读: | ${book.durChapterName} ${formatTime(book.finalDate)} |
- 更新: | ${book.lastChapterName} ${formatTime(book.finalRefreshData)} |
- 来源: | ${book.bookInfoBean.origin} |
+ 书名: | ${book.name} |
+ 作者: | ${book.author} |
+ 阅读: | ${book.durChapterTitle} ${formatTime(book.durChapterTime)} |
+ 更新: | ${book.latestChapterTitle} ${formatTime(book.latestChapterTime)} |
+ 来源: | ${book.origin} |
`;
$('#books').appendChild(bookDiv);
});
@@ -62,19 +62,19 @@ var init = () => {
$('#allcontent').classList.add("read");
var book = books[bookImg.getAttribute("data-series-num")];
$("#info").innerHTML = `
- 来源:${book.bookInfoBean.origin}
- 书名:${book.bookInfoBean.name}
- 作者:${book.bookInfoBean.author}
+ 来源:${book.origin}
+ 书名:${book.name}
+ 作者:${book.author}
阅读章节:${book.durChapterName}
- 阅读时间:${formatTime(book.finalDate)}
- 最新章节:${book.lastChapterName}
- 检查时间:${formatTime(book.finalRefreshData)}
- 简介:${book.bookInfoBean.introduce.trim().replace(/\n/g, "
")}
`;
+ 阅读时间:${formatTime(book.durChapterTime)}
+ 最新章节:${book.latestChapterTitle}
+ 检查时间:${formatTime(book.lastCheckTime)}
+ 简介:${book.intro.trim().replace(/\n/g, "
")}
`;
window.location.hash = "";
window.location.hash = "#info";
$("#content").innerHTML = "章节列表加载中...";
$("#chapter").innerHTML = "";
- fetch(apiAddress("getChapterList", book.noteUrl), { mode: "cors" })
+ fetch(apiAddress("getChapterList", book.bookUrl), { mode: "cors" })
.then(res => res.json())
.then(data => {
if (!data.isSuccess) {
diff --git a/app/src/main/assets/web/index.html b/app/src/main/assets/web/index.html
index 2c47adb7f..452e521f3 100644
--- a/app/src/main/assets/web/index.html
+++ b/app/src/main/assets/web/index.html
@@ -294,6 +294,7 @@
(?i) 前缀表示忽略大小写
代码在线运行工具
+ 阅读书架(测试)
diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt
index b02414b29..6bca4a5f4 100644
--- a/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt
+++ b/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt
@@ -93,9 +93,7 @@ class SearchViewModel(application: Application) : BaseViewModel(application) {
//存在
for (temp in newDataS) {
var hasSame = false
- var i = 0
- val size = copyDataS.size
- while (i < size) {
+ for (i in copyDataS.indices) {
val searchBook = copyDataS[i]
if (temp.name == searchBook.name
&& temp.author == searchBook.author
@@ -104,7 +102,6 @@ class SearchViewModel(application: Application) : BaseViewModel(application) {
searchBook.addOrigin(temp.bookUrl)
break
}
- i++
}
if (!hasSame) {
searchBooksAdd.add(temp)