diff --git a/buyer/src/components/Search.vue b/buyer/src/components/Search.vue index 0354bcf4..7d6b5471 100644 --- a/buyer/src/components/Search.vue +++ b/buyer/src/components/Search.vue @@ -53,6 +53,10 @@ export default { store: { // 是否为店铺页面 type: Boolean, default: false + }, + hover: { + type: Boolean, + default: false } }, data () { @@ -89,10 +93,14 @@ export default { } else { this.logoImg = this.Cookies.getItem('logo') } + this.searchData = this.$route.query.keyword - hotWords({start: 1, end: 5}).then(res => { - if (res.success) this.promotionTags = res.result - }) + + if (!this.hover) { // 首页顶部固定搜索栏不调用热词接口 + hotWords({start: 1, end: 5}).then(res => { + if (res.success) this.promotionTags = res.result + }) + } } }; diff --git a/buyer/src/components/header/Header.vue b/buyer/src/components/header/Header.vue index d83050d0..f0dbd12e 100644 --- a/buyer/src/components/header/Header.vue +++ b/buyer/src/components/header/Header.vue @@ -2,37 +2,33 @@