Feat:康养页面
This commit is contained in:
@@ -0,0 +1,152 @@
|
||||
<template>
|
||||
<view class="sanctum-wrap">
|
||||
<view class="v12-justify-center">
|
||||
<view class="v12-mr-3 v12-radius-100 v12-primary v12-white-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold">养生圣地</view>
|
||||
<view class="v12-radius-100 v12-grey v12-dark-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold" @click="toFoods">养生食材</view>
|
||||
</view>
|
||||
<view class="v12-justify-between v12-align-center v12-mt-5">
|
||||
<view class="v12-font-28 v12-secondary-dark-text v12-mr-3">昆明市</view>
|
||||
<view class="flex-1"><u-search :showAction="false"></u-search></view>
|
||||
</view>
|
||||
<view class="v12-justify-between swap">
|
||||
<view v-for="(item, index) in traveItems" :key="index" class="trave-item-wrap v12-mr-3 v12-mt-3">
|
||||
<view class="trave-item"></view>
|
||||
<view class="trave-btn">旅居预约</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="v12-justify-between v12-align-center v12-px-3 v12-mt-3">
|
||||
<view
|
||||
class="tab v12-font-bold v12-font-34 v12-dark-text "
|
||||
v-for="(tab, index) in tabs"
|
||||
@click="handleTab(index)"
|
||||
:key="index">
|
||||
<text>{{ tab.label }}</text>
|
||||
<view :class="{'slider': index === actived}"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="v12-justify-between sanctup-items v12-mt-3">
|
||||
<view v-for="(item, index) in items" :key="index" class="v12-pa-1">
|
||||
<view class="img">
|
||||
<view class="v12-white-text v12-font-weight-300 address">{{ item.adress }}</view>
|
||||
</view>
|
||||
<view class="v12-font-bold v12-font-28 more-t">{{ item.title }}</view>
|
||||
<view class="v12-justify-start v12-align-center v12-my-2">
|
||||
<view class="atr"></view>
|
||||
<view class="v12-font-26 v12-ml-2 v12-dark-text one-t">{{ item.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabs: [
|
||||
{label: '泡温泉', value: 0},
|
||||
{label: '养生茶馆', value: 1},
|
||||
{label: '康养生活', value: 2},
|
||||
{label: '养生食府', value: 3},
|
||||
],
|
||||
items: [
|
||||
{img: '',adress: '昆明', title: '千年矿泉富含硅酸等等24种微量元素', atr: '', name: '末西梓言民宿'},
|
||||
{img: '',adress: '昆明', title: '千年矿泉富含硅酸等等24种微量元素', atr: '', name: '末西梓言民宿'},
|
||||
{img: '',adress: '昆明', title: '千年矿泉富含硅酸等等24种微量元素', atr: '', name: '末西梓言民宿'},
|
||||
{img: '',adress: '昆明', title: '千年矿泉富含硅酸等等24种微量元素', atr: '', name: '末西梓言民宿'},
|
||||
{img: '',adress: '昆明', title: '千年矿泉富含硅酸等等24种微量元素', atr: '', name: '末西梓言民宿'},
|
||||
{img: '',adress: '昆明', title: '千年矿泉富含硅酸等等24种微量元素', atr: '', name: '末西梓言民宿'},
|
||||
],
|
||||
traveItems: [
|
||||
{img: '', value: ''},
|
||||
{img: '', value: ''},
|
||||
{img: '', value: ''},
|
||||
{img: '', value: ''},
|
||||
{img: '', value: ''},
|
||||
{img: '', value: ''},
|
||||
{img: '', value: ''},
|
||||
{img: '', value: ''},
|
||||
],
|
||||
actived: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTab(index) {
|
||||
this.actived = index
|
||||
},
|
||||
toFoods() {
|
||||
uni.navigateTo({
|
||||
url: '/pkg_product/views/healthFoods'
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.flex-1{
|
||||
flex: 1;
|
||||
}
|
||||
.swap{
|
||||
overflow: auto;
|
||||
}
|
||||
.trave-item-wrap{
|
||||
position: relative;
|
||||
}
|
||||
.trave-btn{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
bottom: 30rpx;
|
||||
text-align: center;
|
||||
width: 212rpx;
|
||||
background: rgba(255,255,255,0.9);
|
||||
border-radius: 60rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.trave-item{
|
||||
width: 382rpx;
|
||||
height: 272rpx;
|
||||
background: rgba(230,178,178,0.39);
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.address{
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
bottom: 30rpx;
|
||||
}
|
||||
.sanctup-items{
|
||||
display: grid;
|
||||
grid-template-columns: 50% 50%;
|
||||
}
|
||||
.atr{
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
background: #707070;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.img{
|
||||
width: 320rpx;
|
||||
height: 320rpx;
|
||||
background: #707070;
|
||||
border-radius: 16rpx;
|
||||
position: relative;
|
||||
}
|
||||
.sanctum-wrap{
|
||||
height: 100vh;
|
||||
background-color: #fff;
|
||||
padding: 20rpx ;
|
||||
}
|
||||
.tab{
|
||||
position: relative;
|
||||
}
|
||||
.slider{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 6rpx;
|
||||
background: linear-gradient(to right, #C52733 0%, rgba(255,255,255,0) 100%);
|
||||
border-radius: 6rpx;
|
||||
bottom: 5rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user