|
|
@ -10,7 +10,7 @@ |
|
|
|
<section class='card m-top10' v-else> |
|
|
|
<div class="title"><span>热门搜索</span></div> |
|
|
|
<van-button type="default" round size="small" class="m-right10 m-top10" v-for="(item, index) in topWordList" |
|
|
|
:key="index" @click="handelClickTopSearch(item.name)">{{ item.name }}</van-button> |
|
|
|
:key="index" @click="handelClickTopSearch(item)">{{ item}}</van-button> |
|
|
|
</section> |
|
|
|
<div class="card" v-if="searchFlag"> |
|
|
|
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="getTable"> |
|
|
@ -38,7 +38,7 @@ export default { |
|
|
|
], |
|
|
|
pageSize: 10, |
|
|
|
pageNo: 1, |
|
|
|
topWordList: {} |
|
|
|
topWordList: [] |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
@ -87,8 +87,8 @@ export default { |
|
|
|
}, |
|
|
|
async popularSearch() { |
|
|
|
const res = await popularSearch() |
|
|
|
if (res.code == 0) { |
|
|
|
this.topWordList = res.data |
|
|
|
if (res) { |
|
|
|
this.topWordList = res |
|
|
|
} else { |
|
|
|
this.$toast(res.msg) |
|
|
|
} |
|
|
|