a1300399510@qq.com 提交于 2023/04/03 -15:00:02
This commit is contained in:
parent
44a2782936
commit
37bb89495c
@ -12,7 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 结果数量 -->
|
<!-- 结果数量 -->
|
||||||
<div class="numberResults flexacenter">大约找到 <div class="number">{{ total }}</div> 条结果</div>
|
<div class="numberResults flexacenter">大约找到 <div class="number">{{ count }}</div> 条结果</div>
|
||||||
|
|
||||||
<div class="result-box flexacenter">
|
<div class="result-box flexacenter">
|
||||||
<div class="result-item flexflex" v-for="(item, index) in list" :key="index">
|
<div class="result-item flexflex" v-for="(item, index) in list" :key="index">
|
||||||
@ -61,7 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="paging flexcenter">
|
<div class="paging flexcenter">
|
||||||
<el-pagination small background layout="prev, pager, next" :total="1000">
|
<el-pagination small background layout="prev, pager, next" @current-change="currentXhange" :current-page.sync="page" :page-size="limit" :total="count">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -75,10 +75,9 @@ export default {
|
|||||||
return {
|
return {
|
||||||
kw: "",
|
kw: "",
|
||||||
count: 0,
|
count: 0,
|
||||||
limit: 50,
|
limit: 20,
|
||||||
nextpage: true,
|
nextpage: true,
|
||||||
page: 0,
|
page: 20,
|
||||||
total: 0,
|
|
||||||
list: []
|
list: []
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -104,15 +103,17 @@ export default {
|
|||||||
|
|
||||||
// 获取搜索结果数据
|
// 获取搜索结果数据
|
||||||
getSearchResult() {
|
getSearchResult() {
|
||||||
|
this.page = this.page + 1
|
||||||
this.$http.post("/api/search", {
|
this.$http.post("/api/search", {
|
||||||
keyword: this.kw,
|
keyword: this.kw,
|
||||||
page: this.page
|
// keyword: "helsinki",
|
||||||
|
page: this.page,
|
||||||
|
limit: this.limit
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res, "res");
|
console.log(res, "res");
|
||||||
let data = res.data
|
let data = res.data
|
||||||
this.list = data.data
|
this.list = data.data
|
||||||
this.total = data.total
|
this.count = data.count
|
||||||
this.nextpage = data.nextpage
|
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -123,6 +124,7 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
.container {
|
||||||
padding-top: 1.3rem;
|
padding-top: 1.3rem;
|
||||||
|
padding-bottom: 1.3rem;
|
||||||
|
|
||||||
.search-input-box {
|
.search-input-box {
|
||||||
margin-left: .32rem;
|
margin-left: .32rem;
|
||||||
@ -261,11 +263,13 @@ export default {
|
|||||||
.icon-look {
|
.icon-look {
|
||||||
width: .4267rem;
|
width: .4267rem;
|
||||||
height: .18rem;
|
height: .18rem;
|
||||||
|
margin-right: .16rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-msg {
|
.icon-msg {
|
||||||
width: .32rem;
|
width: .32rem;
|
||||||
height: .28rem;
|
height: .28rem;
|
||||||
|
margin-right: .16rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user