133 lines
3.2 KiB
Vue
133 lines
3.2 KiB
Vue
<template>
|
|
<view class="search-page">
|
|
<view class="v12-mr-3">
|
|
<u-search searchIconColor="#C52733" :showAction="false" v-model="keyword" @search="search"></u-search>
|
|
</view>
|
|
<view v-if="isSearch" class="search-res-wrap">
|
|
<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 class="img">
|
|
<image class="img" :src="item.cover" v-if="item.coverType === 1"></image>
|
|
<video
|
|
class="img"
|
|
:src="item.cover"
|
|
:play-btn-position="center"
|
|
:show-fullscreen-btn="false"
|
|
:show-play-btn="false"
|
|
:show-center-play-btn="flase"
|
|
v-if="item.coverType === 2">
|
|
</video>
|
|
<view class="v12-white-text address">
|
|
<image
|
|
class="map-icon v12-mr-1"
|
|
:src="webUrl + '/orderIcon/map_white.png'"
|
|
></image>
|
|
<text class="v12-font-28">{{ item.areaName }}</text>
|
|
</view>
|
|
</view>
|
|
<view class="v12-font-bold v12-font-28 v12-mt-1 more-t desc-txt">{{ item.content }}</view>
|
|
<view class="v12-justify-start v12-align-center v12-my-1">
|
|
<view class="atr">
|
|
<image class="atr" :src="item.logo"></image>
|
|
</view>
|
|
<view class="v12-font-26 v12-ml-2 v12-dark-text one-t">{{ item.hotelName }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view v-if="items.length === 0 && keyword" class="v12-justify-center v12-mt-16">
|
|
<view class="no-data-wrap">
|
|
<image :src="webUrl + '/orderIcon/微信图片_20241009220552.png'" mode="widthFix"></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { getCategory,getWellnessPlace } from '@/api/health'
|
|
export default {
|
|
data() {
|
|
return {
|
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
|
keyword: '',
|
|
goodCityId: '',
|
|
isSearch: false,
|
|
items: []
|
|
}
|
|
},
|
|
onLoad(opts) {
|
|
this.goodCityId = opts.city
|
|
},
|
|
methods: {
|
|
search() {
|
|
const params = {
|
|
goodCityId: this.goodCityId,
|
|
categoryId: '',
|
|
keyword: this.keyword,
|
|
page: 1,
|
|
limit: 9999
|
|
}
|
|
getWellnessPlace(params).then(res => {
|
|
this.items = res.data.records
|
|
}).finally(() => {
|
|
this.isSearch = true
|
|
})
|
|
},
|
|
toStore(id) {
|
|
this.$yrouter.push({
|
|
path: '/pagesInn/inn/innHome',
|
|
query: {
|
|
id: id
|
|
}
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.map-icon{
|
|
width: 28rpx;
|
|
height: 28rpx;
|
|
}
|
|
.arrow-icon{
|
|
width: 25rpx;
|
|
height: 25rpx;
|
|
}
|
|
.icon{
|
|
width: 30rpx;
|
|
height: 30rpx;
|
|
}
|
|
.address{
|
|
position: absolute;
|
|
left: 30rpx;
|
|
bottom: 30rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.desc-txt {
|
|
height: 78rpx;
|
|
line-height: 40rpx;
|
|
}
|
|
.search-page{
|
|
min-height: 100vh;
|
|
background-color: #fff;
|
|
padding: 20rpx;
|
|
}
|
|
.sanctup-items{
|
|
display: grid;
|
|
grid-template-columns: 50% 50%;
|
|
}
|
|
.img{
|
|
width: 320rpx;
|
|
height: 320rpx;
|
|
border-radius: 16rpx;
|
|
position: relative;
|
|
}
|
|
.atr{
|
|
width: 52rpx;
|
|
height: 52rpx;
|
|
border-radius: 50%;
|
|
}
|
|
</style> |