店铺会员制Vip功能增加

This commit is contained in:
2022-08-11 15:48:33 +08:00
parent 7e8ed7115d
commit 4b3d83007b
35 changed files with 6869 additions and 2379 deletions

View File

@@ -0,0 +1,157 @@
<template>
<view class="goods-item">
<image :src="item.cover" mode="aspectFill" class="goods-cover" />
<view class="tags"> VIP </view>
<view class="goods-info">
<view class="_title">{{item.name}}</view>
<view class="_des">
{{item.shop.name}}
</view>
<view class="_pin" v-if="item.sales>0">
<view class="_has"> <image src="/static/book/fire.png" mode="widthFix" class="fire" /> 已换购 {{item.sales}} </view>
</view>
<view class="price">
<view class="money">{{item.price.price_min}} <span>DT积分</span> </view>
<view class="now-pin" @click="goPin(item.goods_id)">立即领取</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
},
props: {
item: {
type: Object,
default: {},
}
},
methods: {
goPin(id) {
this.$emit('goPin',id)
}
},
};
</script>
<style lang="scss" scoped>
.goods-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
background-color: white;
border-radius: 10rpx;
padding: $padding;
margin-bottom: 20rpx;
position: relative;
overflow: hidden;
.tags {
position: absolute;
top: 6rpx;
left: -54rpx;
background: #d81e06;
color: #fff;
width: 150rpx;
font-size: 24rpx;
padding: 4rpx 0;
text-align: center;
transform: rotate(-45deg);
font-weight: bold;
letter-spacing:2rpx;
}
.goods-cover {
width: 160rpx;
height: 160rpx;
border-radius: 10rpx;
}
.goods-info {
width: calc(100% - 160rpx - 30rpx);
padding-left: $padding;
._title {
overflow: hidden;
font-size: 30rpx;
font-weight: 600;
white-space: nowrap;
text-overflow: ellipsis;
}
._des {
font-size: 28rpx;
padding: 6rpx 0;
color: #4f300a;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
}
._pin {
font-size: 26rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: $text-gray;
._has {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: #d81e06;
background-color: rgba($color: $text-price, $alpha: 0.1);
padding: 4rpx 10rpx;
border-radius: 30rpx;
image {
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
}
.tuan {
margin-left: $margin;
}
}
.price {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding-top: 20rpx;
.money {
font-size: 34rpx;
font-weight: 600;
color: #d81e06;
span{
font-size: 24rpx;
margin-left: 10rpx;
font-weight: normal;
}
}
.now-pin {
background-color: #d81e06;
font-size: 28rpx;
font-weight: bold;
padding: 6rpx 20rpx;
border-radius: 20rpx;
color: #fff;
}
}
}
}
</style>