deming/components/shop/recommend/index.vue

113 lines
2.9 KiB
Vue
Raw Normal View History

2020-06-11 09:34:23 +08:00
<template>
<view class="recommend">
<view class="top">
<text>今日秒杀推荐</text>
<text>点击查看更多></text>
</view>
<view class="connect">
2020-07-15 16:21:43 +08:00
<view class="time" v-if="type=='spike'">
<image src="/static/image/common/15.png"></image>
<text>{{ info.groupbuy_starttime_histime }}</text>
2020-06-11 09:34:23 +08:00
</view>
<view class="info">
2020-07-15 16:21:43 +08:00
<text class="u-line-1">{{ info.groupbuy_name }}</text>
<text class="u-line-2">{{ info.goods_name }}</text>
2020-06-11 09:34:23 +08:00
<view>
2020-07-15 16:21:43 +08:00
<text>{{ info.groupbuy_price }}</text>
<text>{{ info.goods_price }}</text>
2020-06-11 09:34:23 +08:00
</view>
</view>
2020-07-15 16:21:43 +08:00
<image class="img" :src="info.groupbuy_image1"></image>
2020-06-11 09:34:23 +08:00
</view>
</view>
</template>
<script>
export default {
2020-07-15 16:21:43 +08:00
name:"recommend",
data() {
return {
info: {}
}
},
props: ['recommendData', 'type'],
created() {
this.info = this.recommendData;
console.log(this.recommendData);
}
2020-06-11 09:34:23 +08:00
}
</script>
<style lang="scss" scoped>
.recommend{
.top{
height: 90rpx;
display: flex;
align-items: center;
justify-content: space-between;
>text:first-child{
font-size: 30rpx;
color: #333;
}
>text:last-child{
font-size: 18rpx;
color: #999;
}
}
.connect{
display: flex;
.time{
display: flex;
flex-direction: column;
align-items: center;
2020-07-15 16:21:43 +08:00
margin-right: 28rpx;
2020-06-11 09:34:23 +08:00
justify-content: center;
>image{
width: 90rpx;
height: 90rpx;
}
>text{
font-size: 36rpx;
margin-top: 25rpx;
color: #FDD360;
}
flex-shrink: 0;
}
.info{
2020-07-15 16:21:43 +08:00
width: 340rpx;
2020-06-11 09:34:23 +08:00
display: flex;
flex-direction: column;
>text:nth-child(1){
font-size: 28rpx;
color: #333;
}
>text:nth-child(2){
margin-top: 17rpx;
line-height: 36rpx;
font-size: 24rpx;
color: #666;
}
>view{
margin-top: 24rpx;
display: flex;
align-items: flex-end;
>text:first-child{
font-size: 27rpx;
color: #FF3131;
}
>text:last-child{
font-size: 24rpx;
color: #999;
margin-left: 33rpx;
2020-07-15 16:21:43 +08:00
text-decoration: line-through;
2020-06-11 09:34:23 +08:00
}
}
}
.img{
width: 213rpx;
height: 160rpx;
flex-shrink: 0;
margin-left: 13rpx;
}
}
}
</style>