205 lines
4.7 KiB
Plaintext
Raw Normal View History

2021-01-15 12:00:20 +08:00
<style lang="less">
.header-image {
width: 100%;
height: 200px;
z-index: -1;
position: absolute;
top: 0;
}
.user-banner {
margin-top: 180px;
border-top: 1px solid #F2F3F5;
border-top-right-radius: 20px;
border-top-left-radius: 20px;
text-align: left;
background-color: #eeeeee;
height: 20px;
width: 100%;
z-index: 1;
}
.menu-desc {
2021-01-15 23:31:44 +08:00
border: #fff 1px solid;
2021-01-15 12:00:20 +08:00
border-radius: 20px;
2021-01-15 23:31:44 +08:00
width: 270rpx;
2021-01-15 12:00:20 +08:00
height: 60px;
box-shadow: 4px 4px 10px #cccccc;
2021-01-15 23:31:44 +08:00
background-color: #ffffff;
padding: 10px;
2021-01-15 12:00:20 +08:00
display: flex;
2021-01-15 23:31:44 +08:00
2021-01-15 12:00:20 +08:00
font-weight: bold;
}
2021-01-15 23:31:44 +08:00
.grid-body {
border: #fff 1px solid;
border-radius: 20px;
width: 700rpx;
margin-top: 20px;
background-color: white;
box-shadow: 4px 4px 10px #eeeeee;
}
2021-01-15 12:00:20 +08:00
.menu-desc-text {
margin-top: 5px;
2021-01-15 23:31:44 +08:00
font-size: 12px;
color: #999;
display: flex;
2021-01-15 12:00:20 +08:00
}
.grid-item {
background-color: #eeeeee;
}
.column-record-item {
border: transparent 1px solid;
border-radius: 20px;
box-shadow: 4px 4px 10px #cccccc;
display: flex;
flex-direction: column;
font-weight: bold;
}
.column-record-item-text {
font-size: 20px;
margin: 10px;
display: flex;
flex-direction: column;
}
</style>
<template>
2021-01-15 23:31:44 +08:00
<div class="container">
2021-01-15 12:00:20 +08:00
<image class="header-image" :src="imageDefine.HOME_TITLE_IMAGE" />
<div class="user-banner" />
<view style="margin: 10px;display: flex;flex-direction: column;">
<van-row>
<van-col offset="1" span="4">
<van-image round width="80rpx" height="80rpx" :src="user.userInfo.avatar" />
</van-col>
<van-col offset="1" span="10">
<div class="fxc" style="display: flex;flex-direction: column;">
<span>{{user.userInfo.nickName}}</span>
2021-01-15 23:31:44 +08:00
<span>{{user.mobile}}</span>
2021-01-15 12:00:20 +08:00
</div>
</van-col>
2021-01-15 23:31:44 +08:00
<van-col offset="1" span="7">
<van-button round style="height: 25px;" size="small" plain color="#AC1630">
<van-icon name="shopping-cart-o" color="#AC1630" />
<span style="margin-left: 5px;color: #333333;">购物车</span>
</van-button>
2021-01-15 12:00:20 +08:00
</van-col>
</van-row>
<van-row style="margin-top: 20px;">
<van-col offset="1" span="11">
2021-01-15 23:31:44 +08:00
<div class="menu-desc" @tap="onNavItem(navDefine.HOME_MENU1)">
<div class="fxc">
<span style="font-size: 18px;">酒庄介绍</span>
<span class="menu-desc-text">完美酿造工艺</span>
</div>
<van-image style="margin-left: 10px;" width="40px" height="40px" :src="navDefine.HOME_MENU1.image" />
2021-01-15 12:00:20 +08:00
</div>
</van-col>
2021-01-15 23:31:44 +08:00
2021-01-15 12:00:20 +08:00
<van-col offset="1" span="11">
2021-01-15 23:31:44 +08:00
<div class="menu-desc" @tap="onNavItem(navDefine.HOME_MENU2)">
<div class="fxc">
<span>购买庄酒</span>
<span class="menu-desc-text">限量年份套装</span>
</div>
<van-image style="margin-left: 10px;" width="40px" height="40px" :src="navDefine.HOME_MENU2.image" />
2021-01-15 12:00:20 +08:00
</div>
2021-01-15 23:31:44 +08:00
2021-01-15 12:00:20 +08:00
</van-col>
2021-01-15 23:31:44 +08:00
2021-01-15 12:00:20 +08:00
</van-row>
2021-01-15 23:31:44 +08:00
<div class="grid-body">
<van-grid column-num="3" border="{{ false }}" style="margin-top: 15px;">
<van-grid-item use-slot v-for=" (item, index) in navDefine.HOME_MENU_LIST" @tap="onNavItem(item)">
<van-image round width="120rpx" height="120rpx" :src="item.icon" />
<span>{{item.name}} </span>
</van-grid-item>
</van-grid>
</div>
2021-01-15 12:00:20 +08:00
<span style="margin:15px 0;font-weight: bold;">热门活动</span>
2021-01-15 12:00:20 +08:00
2021-01-15 23:31:44 +08:00
<van-image width="100%" height="60px" :src="navDefine.HOME_BANNER.image" />
2021-01-15 12:00:20 +08:00
2021-01-15 23:31:44 +08:00
<span v-if="columnRecord.length > 0" style="margin:15px 0;font-weight: bold;">每日精选</span>
2021-01-15 12:00:20 +08:00
<div class="column-record-item" v-for="(item, index) in columnRecord">
<van-image width="100%" height="60px" :src="item.image" />
<div class="column-record-item-text">
<span>{{item.title}} </span>
<span style="font-size: 12px;font-weight: normal;">{{item.createTime}} </span>
</div>
</div>
</view>
</div>
</template>
<script>
import wepy from '@wepy/core'
import store from '@/store'
import { mapActions, mapState } from '@wepy/x'
2021-01-15 23:31:44 +08:00
import defaultMix from '../../../mixins/defaultMix'
2021-01-15 12:00:20 +08:00
wepy.component({
store,
hooks: {},
2021-01-15 12:00:20 +08:00
data: {
columnRecord: [
{
title: '标题标题标题标题标题',
createTime: '2000-11-11',
image: 'https://www.xiao4r.com/xiao4rstatic/img/doctor.png'
}
]
},
mixins: [defaultMix],
2021-01-15 12:00:20 +08:00
computed: {
...mapState({
'imageDefine': state => state.imageDefine,
'user': state => state.user,
'navDefine': state => state.navDefine
})
},
methods: {},
ready() {
}
})
</script>
<config>
{
navigationBarTitleText: ''
}
</config>