diff --git a/pages/home/index.vue b/pages/home/index.vue index 885b961..e83a2c7 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -20,6 +20,9 @@ :src="webUrl + '/home/icon-search2.png'" class="icon" /> + + + @@ -354,6 +357,9 @@ import ProductWindow from '@/components/ProductWindow' import goCartMixin from '@/mixins/goCartMixins' import FunctionGuide from '@/components/FunctionGuide' import GuideMixins from '@/mixins/GuideMixins' +import { + getSearchPageConfig +} from '@/api/search' import { getCurAddress, getLocationPromise, @@ -409,7 +415,8 @@ export default { videoContext: null, isPlay: true, tabIconPostion: {}, - messageIcon: {} + messageIcon: {}, + recommendKeyword: [] } }, onLoad() { @@ -417,6 +424,7 @@ export default { const _this = this _this.init() _this.queryGuide('index') + this.getSearch() uni.getSystemInfo({ success: (e) => { let statusBar = 0 @@ -444,7 +452,14 @@ export default { this.scrollTop = e.scrollTop }, methods: { - + getSearch() { + getSearchPageConfig().then(res => { + const { success, data } = res + if (success) { + this.recommendKeyword = data.recommendKeyword.split(',') + } + }) + }, elementData(e) { this.tabIconPostion = e }, @@ -1707,6 +1722,9 @@ export default { } } } +.swpier-bar{ + width: 100%; +} .fix-header { position: fixed; top: 0; diff --git a/pages/shop/GoodSearch/index.vue b/pages/shop/GoodSearch/index.vue index 4f523c3..11062ae 100644 --- a/pages/shop/GoodSearch/index.vue +++ b/pages/shop/GoodSearch/index.vue @@ -5,15 +5,22 @@ - + 搜索 + + + +