diff --git a/novel-front/src/main/resources/templates/user/favorites.html b/novel-front/src/main/resources/templates/user/favorites.html index 985bec0..92facf3 100644 --- a/novel-front/src/main/resources/templates/user/favorites.html +++ b/novel-front/src/main/resources/templates/user/favorites.html @@ -53,7 +53,7 @@ 更新时间 - 书签 + 操作 @@ -94,7 +94,7 @@ var bookShelfListHtml = ""; for (var i = 0; i < bookShelfList.length; i++) { var book = bookShelfList[i]; - bookShelfListHtml += (" \n" + + bookShelfListHtml += (" \n" + " \n" + " [" + book.catName + "]\n" + " \n" + @@ -109,7 +109,8 @@ " " + book.lastIndexUpdateTime + "\n" + " \n" + " \n" + - "继续阅读" + + "
继续阅读
" + + "
移除书架
" + " \n" + " "); } @@ -160,5 +161,21 @@ }) } + + function removeFromBookShelf(bookId) { + + $.ajax({ + type: "delete", + url: "/user/removeFromBookShelf/" + bookId, + data: {}, + dataType: "json", + success: function (data) { + if (data.code == 200) { + $("#shelf" + bookId).remove(); + } + } + }); + + }