deming/components/shop/special-shop/index.vue

91 lines
1.8 KiB
Vue
Raw Normal View History

2020-07-16 17:39:06 +08:00
<template>
<view class="special">
<image :src="item.groupbuy_image1"></image>
<view class="right">
<view class="name u-line-1">{{ item.goods_name }}</view>
<view class="price" v-if="type == 'spike'">
<view class="groupbuy-price">{{ item.groupbuy_price }}</view>
<view class="goods-price">{{ item.goods_price }}</view>
</view>
<view class="buy">
<view class="num">剩余{{ item.inventory }}</view>
<view class="btn">立即购买</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {}
},
props: {
item: Object,
type: String,
},
created() {
console.log(this.item);
}
};
</script>
<style lang="scss" scoped>
.special {
margin-bottom: 30rpx;
display: flex;
width: 690rpx;
background: rgba(245,245,245,1);
border-radius: 6rpx;
> image {
flex-shrink: 0;
width: 210rpx;
height: 170rpx;
border-radius: 6rpx 0rpx 0rpx 6rpx;
}
.right {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 20rpx;
.name {
width: 400rpx;
font-size: 26rpx;
color: rgba(51,51,51,1);
margin-bottom: 20rpx;
}
.price {
display: flex;
.groupbuy-price {
font-size: 26rpx;
color: rgba(255,49,49,1);
margin-right: 12rpx;
}
.goods-price {
font-size: 24rpx;
text-decoration: line-through;
color: rgba(153,153,153,1);
}
}
.buy {
display: flex;
justify-content: space-between;
align-items: center;
.num {
font-size: 22rpx;
color: rgba(102,102,102,1);
}
.btn {
width: 140rpx;
height: 50rpx;
background: rgba(255,120,15,1);
border-radius: 25rpx;
font-size: 22rpx;
font-weight: 500;
color: rgba(255,255,255,1);
line-height: 50rpx;
text-align: center;
}
}
}
}
</style>