From 37bb89495ca7d5d16dc4f02e4927f46a87a88c8a Mon Sep 17 00:00:00 2001 From: XiaoMo Date: Mon, 3 Apr 2023 15:00:15 +0800 Subject: [PATCH] =?UTF-8?q?a1300399510@qq.com=20=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BA=8E=202023/04/03=20-15:00:02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../search/searchResult/SearchResult.vue | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/views/search/searchResult/SearchResult.vue b/src/views/search/searchResult/SearchResult.vue index 859e23e..f40530e 100755 --- a/src/views/search/searchResult/SearchResult.vue +++ b/src/views/search/searchResult/SearchResult.vue @@ -12,7 +12,7 @@ -
大约找到
{{ total }}
条结果
+
大约找到
{{ count }}
条结果
@@ -61,7 +61,7 @@
- +
@@ -75,10 +75,9 @@ export default { return { kw: "", count: 0, - limit: 50, + limit: 20, nextpage: true, - page: 0, - total: 0, + page: 20, list: [] } @@ -104,15 +103,17 @@ export default { // 获取搜索结果数据 getSearchResult() { + this.page = this.page + 1 this.$http.post("/api/search", { keyword: this.kw, - page: this.page + // keyword: "helsinki", + page: this.page, + limit: this.limit }).then(res => { console.log(res, "res"); let data = res.data this.list = data.data - this.total = data.total - this.nextpage = data.nextpage + this.count = data.count }) }, @@ -123,6 +124,7 @@ export default {