From 07e0e5a390b39d003af34cfdb960d9b1045829de Mon Sep 17 00:00:00 2001 From: Jianyun Date: Tue, 27 Aug 2024 15:14:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/calibre-pages/src/api/api.ts | 4 +-- app/calibre-pages/src/views/BatchMeta.vue | 2 +- app/calibre-pages/src/views/Search.vue | 30 +++++++++++------------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/calibre-pages/src/api/api.ts b/app/calibre-pages/src/api/api.ts index 978d25b..24a3afb 100644 --- a/app/calibre-pages/src/api/api.ts +++ b/app/calibre-pages/src/api/api.ts @@ -23,8 +23,8 @@ export async function fetchRecentBooks(limit: number, offset: number) { return response.json().then((data) => data.data); } -export async function fetchBooks(filter: string[], limit: number, offset: number) { - const response = await fetch('/api/search?q=', { +export async function fetchBooks(keyword: string, filter: string[], limit: number, offset: number) { + const response = await fetch('/api/search?q=' + keyword, { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/app/calibre-pages/src/views/BatchMeta.vue b/app/calibre-pages/src/views/BatchMeta.vue index dc1a266..1bd8a9c 100644 --- a/app/calibre-pages/src/views/BatchMeta.vue +++ b/app/calibre-pages/src/views/BatchMeta.vue @@ -415,7 +415,7 @@ export default { if (this.filterType === 'isbn') { this.filter[0] = `isbn = "${this.keyword}"`; } - const data = await fetchBooks(this.filter, this.limit, this.offset); + const data = await fetchBooks("", this.filter, this.limit, this.offset); this.books = data.records this.total = data.total diff --git a/app/calibre-pages/src/views/Search.vue b/app/calibre-pages/src/views/Search.vue index 2d10589..8096571 100644 --- a/app/calibre-pages/src/views/Search.vue +++ b/app/calibre-pages/src/views/Search.vue @@ -3,11 +3,11 @@
@@ -17,26 +17,26 @@ {{ keyword }} 共计 {{ total }} 条, 当前{{ offset }} -- + >共计 {{ total }} 条, 当前{{ offset }} -- {{ offset + limit >= total ? total : offset + limit }} - + - + 上一页 下一页 + >下一页 - + @@ -44,12 +44,12 @@