Style(千县名品):千县名品搜索后,调整搜索时的页面样式

This commit is contained in:
linxi
2024-08-26 17:22:33 +08:00
parent 5e4f3aced6
commit a97835ed27
+15 -4
View File
@@ -8,9 +8,9 @@
placeholder="请输入关键词县名~" placeholder="请输入关键词县名~"
placeholder-style="color:#949494" placeholder-style="color:#949494"
class="inp" class="inp"
@confirm="getListReq" @confirm="handlerSearch"
> >
<view class="btn" @click="getListReq"> <view class="btn" @click="handlerSearch">
搜索 搜索
<image <image
:src="webUrl + '/home/icon-search4.png'" :src="webUrl + '/home/icon-search4.png'"
@@ -47,6 +47,7 @@
</view> </view>
<view <view
class="toggle-wrap" class="toggle-wrap"
v-if="list.length > 6"
@click="toggleStatusHandle" @click="toggleStatusHandle"
> >
<view v-if="!toggleStatus"> <view v-if="!toggleStatus">
@@ -153,6 +154,7 @@
</view> </view>
</view> </view>
<image <image
v-if="!searchEvent"
:src="webUrl + '/home/no-data-bg.png'" :src="webUrl + '/home/no-data-bg.png'"
mode="widthFix" mode="widthFix"
class="loadend" class="loadend"
@@ -198,7 +200,8 @@ export default {
toggleStatus: false, toggleStatus: false,
isLoad: false, isLoad: false,
list: [], list: [],
pageKeyId: Object.freeze('countyFamousIndex') pageKeyId: Object.freeze('countyFamousIndex'),
searchEvent: false
} }
}, },
computed: mapGetters(['userInfo', 'isLogin']), computed: mapGetters(['userInfo', 'isLogin']),
@@ -226,6 +229,14 @@ export default {
this.init() this.init()
}, },
methods: { methods: {
handlerSearch() {
if(this.keyword) {
this.searchEvent = true
} else {
this.searchEvent = false
}
this.getListReq()
},
init() { init() {
// 分享数据 // 分享数据
famousShareImage().then(res => { famousShareImage().then(res => {
@@ -296,7 +307,7 @@ export default {
.county-index { .county-index {
position: relative; position: relative;
min-height: 100vh; min-height: 100vh;
background-color: #fff; background-color: #f0f0f0;
.search-wrap { .search-wrap {
padding: 20rpx 50rpx; padding: 20rpx 50rpx;
background-color: #fff; background-color: #fff;