hz-zhhq-app/pages/luck-food/luck-food.vue

119 lines
2.2 KiB
Vue
Raw Normal View History

2025-01-22 10:53:47 +08:00
<template>
<view>
<view class="uni-list">
<view class="list-item" v-for="(item, index) in voteDte" :key="index">
<view class="content">
<view class="image-box" >
<image mode="" :src="item.picture" />
</view>
<view class="fr-content">
<text class="status" v-if="item.status != ''">{{item.status}}</text>
<view class="text"><text>菜品名称:</text> {{item.food_name}}</view>
<view class="text"><text>菜品类型:</text> {{item.kinds}}</view>
<view class="text"><text>有效期:</text> {{item.date}}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
voteDte : [
{
id:'2',
food_name:'鱼香茄子',
picture : '../../static/food/44.jpg',
kinds : '熟食',
date : '19-12-10 至 20-12-18',
status : ''
},
{
id:'1',
food_name:'西红柿炒鸡蛋',
picture : '../../static/food/33.jpg',
kinds : '熟食',
date : '19-12-10 至 19-12-15',
status : '已过期'
}
]
}
},
methods: {
}
}
</script>
<style lang="scss">
.uni-list{
background: #fff;
.list-item{
border-bottom:10upx solid #f8f8f8;
padding:30upx 20upx;
.content{
overflow:hidden;
.image-box{
float:left;
width:200upx;
height:200upx;
image{
display:block;
width:100%;
height:100%;
}
}
.fr-content{
margin-left:220upx;
font-size:26upx;
.text{
color:#666;
line-height:40upx;
margin-bottom:10upx;
text{
float:left;
color:#333;
padding-right:10upx;
}
}
.status {
color:red;
margin-left: 280upx;
position: absolute;
}
}
}
.bottom{
overflow:hidden;
padding:10upx 20upx 0;
.num-box{
float:left;
font-size:28upx;
color:#333;
line-height:40upx;
padding-top:20upx;
text{
color:#5fbf3d;
padding-left:4upx;
}
}
.vote-btn{
float:right;
width:160upx;
height:60upx;
background: #5fbf3d;
font-size:26upx;
color:#fff;
text-align:center;
line-height:60upx;
border-radius:4upx;
}
}
}
}
</style>