修改主页的搜索框和热词的逻辑
This commit is contained in:
parent
9d5b9a86bc
commit
0cab3dd853
@ -3,10 +3,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hot-word-container {
|
.hot-word-container {
|
||||||
height: 40px;
|
width: auto;
|
||||||
|
height: 50rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
flex: 1;
|
/* flex: 1; */
|
||||||
|
border-radius: 50rpx;
|
||||||
|
margin: 0 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-word-scroll {
|
.hot-word-scroll {
|
||||||
@ -14,9 +17,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hot-word-item {
|
.hot-word-item {
|
||||||
height: 40px;
|
height: 50rpx;
|
||||||
line-height: 40px;
|
line-height: 50rpx;
|
||||||
padding: 0 10px;
|
padding: 0 15rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,7 +121,6 @@ page {
|
|||||||
display: flex;
|
display: flex;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-left: 30rpx;
|
|
||||||
padding-right: 30rpx;
|
padding-right: 30rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
@ -699,9 +701,7 @@ page {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.merchantList2{
|
.merchantList2 {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.merchantItem {
|
.merchantItem {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -37,16 +37,18 @@
|
|||||||
<!-- 搜索框 -->
|
<!-- 搜索框 -->
|
||||||
<view class="search2" v-if="isShowSearch">
|
<view class="search2" v-if="isShowSearch">
|
||||||
<view class="searchBox2">
|
<view class="searchBox2">
|
||||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
|
||||||
mode="aspectFill"></image>
|
|
||||||
<view class="hot-word-container">
|
<view class="hot-word-container">
|
||||||
<view class="hot-word-scroll" :style="{ transform: 'translateY(' + scrollPosition + 'px)' }">
|
<view class="hot-word-scroll" :style="{ transform: 'translateY(' + scrollPosition + 'rpx)' }">
|
||||||
<view v-for="(word, index) in hotWord" :key="index" class="hot-word-item"
|
<view v-for="(word, index) in hotWord" :key="index" class="hot-word-item"
|
||||||
@click="handleHotWordClick(word)">
|
@click="handleHotWordClick(word)">
|
||||||
{{ word }}
|
{{ word }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
||||||
|
mode="aspectFill"></image>
|
||||||
|
<input class="search_input" placeholder='输入搜索的社区名称' confirm-type='search' @input="searchInput"
|
||||||
|
@confirm="searchInput" :value="selectKeyWord" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 轮播图 -->
|
<!-- 轮播图 -->
|
||||||
@ -279,7 +281,7 @@ export default {
|
|||||||
hotWord: [], // 搜索热词
|
hotWord: [], // 搜索热词
|
||||||
scrollPosition: 0, // 滚动位置
|
scrollPosition: 0, // 滚动位置
|
||||||
scrollInterval: null, // 滚动定时器
|
scrollInterval: null, // 滚动定时器
|
||||||
itemHeight: 40, // 每个热词项的高度
|
itemHeight: 50, // 每个热词项的高度
|
||||||
|
|
||||||
// 中部1左侧广告
|
// 中部1左侧广告
|
||||||
serverLeft: '',
|
serverLeft: '',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user