From 06074faf9af103fcccb2437baa073c1f60ba9add Mon Sep 17 00:00:00 2001 From: xiongxiaoyang <1179705413@qq.com> Date: Thu, 20 Mar 2025 17:30:18 +0800 Subject: [PATCH] =?UTF-8?q?feat(pc):=20=E7=A7=BB=E9=99=A4=E4=B9=A6?= =?UTF-8?q?=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/user/favorites.html | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) 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(); + } + } + }); + + }