Fix:3114 【商城小程序】首页及搜索页面搜索框没有显示浮动词条

This commit is contained in:
modendeveloper
2025-01-22 01:15:10 +08:00
parent 94536b0876
commit 626e747049
4 changed files with 79 additions and 12 deletions
+20 -2
View File
@@ -20,6 +20,9 @@
:src="webUrl + '/home/icon-search2.png'"
class="icon"
/>
<view class="swpier-bar">
<u-notice-bar duration="4000" :text="recommendKeyword" :icon="' '" color="#333" fontSize="12" bgColor="transparent" direction="column"></u-notice-bar>
</view>
</view>
</view>
<view class="slider-banner" id="slider-banner-id">
@@ -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;