Fix(养生圣地):[#2491]输入关键词后未点击键盘回车键,列表提示“暂无内容”,默认状态下不用显示暂无内容

This commit is contained in:
lifizer
2024-10-14 11:05:07 +08:00
parent ebe18f0240
commit 820cf2dc3f
+5 -2
View File
@@ -3,6 +3,7 @@
<view class="v12-mr-3"> <view class="v12-mr-3">
<u-search searchIconColor="#C52733" :showAction="false" v-model="keyword" @search="search"></u-search> <u-search searchIconColor="#C52733" :showAction="false" v-model="keyword" @search="search"></u-search>
</view> </view>
<view v-if="isSearch" class="search-res-wrap">
<view class="v12-justify-between sanctup-items v12-mt-3"> <view class="v12-justify-between sanctup-items v12-mt-3">
<view v-for="(item, index) in items" :key="index" class="v12-pa-1" @click="toStore(item.hotelId)"> <view v-for="(item, index) in items" :key="index" class="v12-pa-1" @click="toStore(item.hotelId)">
<view class="img"> <view class="img">
@@ -37,6 +38,7 @@
</view> </view>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
@@ -47,12 +49,12 @@ export default {
webUrl: this.$VUE_APP_RESOURCES_URL, webUrl: this.$VUE_APP_RESOURCES_URL,
keyword: '', keyword: '',
goodCityId: '', goodCityId: '',
isSearch: false,
items: [] items: []
} }
}, },
onLoad(opts) { onLoad(opts) {
this.goodCityId = opts.city this.goodCityId = opts.city
this.search()
}, },
methods: { methods: {
search() { search() {
@@ -64,8 +66,9 @@ export default {
limit: 9999 limit: 9999
} }
getWellnessPlace(params).then(res => { getWellnessPlace(params).then(res => {
// console.log(res);
this.items = res.data.records this.items = res.data.records
}).finally(() => {
this.isSearch = true
}) })
}, },
toStore(id) { toStore(id) {