重构会员卡数据库

This commit is contained in:
2024-07-13 13:46:11 +08:00
parent e8b3a99607
commit f3c18408d3
55 changed files with 3802 additions and 272 deletions
+57 -15
View File
@@ -6,21 +6,36 @@
</view>
<view class="coupon">
<block v-for="(item,index) in list" :key="index">
<view class="coupon-item web-cell">
<view class="coupon-bg">
<view class="title"><span class="price">8</span><span class="unit">元</span></view>
<view class="desc">满减劵</view>
</view>
<view class="coupon-info web-cell web-cell-content">
<view class="coupon-content">
<view class="title">优惠券名称</view>
<view class="desc web-text-secondary">有效期至:2024-05-29</view>
</view>
<uv-button class="save-btn" size="mini"
:customStyle="{background: 'linear-gradient(to right, #70b915, #008e04)',color: '#ffffff', border: 'none'}"
text="去使用" @click="save"></uv-button>
</view>
</view>
<view class="coupon-item web-cell" v-if="item.type === 10">
<view class="coupon-bg">
<view class="title"><span class="price">{{ item.reducePrice }}</span><span class="unit">元</span></view>
<view class="desc">满减劵</view>
</view>
<view class="coupon-info web-cell web-cell-content">
<view class="coupon-content">
<view class="title">{{ item.name }}</view>
<view class="desc web-text-secondary text-xs">有效期至:{{ item.endTime }}</view>
</view>
<uv-button class="save-btn" size="mini"
:customStyle="{background: 'linear-gradient(to right, #70b915, #008e04)',color: '#ffffff', border: 'none'}"
text="去使用" :disabled="item.disabled" @click="toUse(`/pages/shop/shop`)"></uv-button>
</view>
</view>
<view class="coupon-item web-cell" v-if="item.type === 20">
<view class="coupon-bg2" v-if="item.type === 20">
<view class="title"><span class="price">{{ item.discount * 0.1 }}</span><span class="unit">折</span></view>
<view class="desc">折扣劵</view>
</view>
<view class="coupon-info web-cell web-cell-content">
<view class="coupon-content">
<view class="title">{{ item.name }}</view>
<view class="desc web-text-secondary text-xs">有效期至:{{ item.endTime }}</view>
</view>
<uv-button class="save-btn" size="mini"
:customStyle="{background: 'linear-gradient(to right, #70b915, #008e04)',color: '#ffffff', border: 'none'}"
text="去使用" :disabled="item.disabled" @click="toUse(`/pages/shop/shop`)"></uv-button>
</view>
</view>
</block>
<!-- <uv-empty mode="order" v-if="list.length == 0"
icon="https://cdn.uviewui.com/uview/empty/data.png"></uv-empty> -->
@@ -172,6 +187,11 @@
url
})
},
toUse(url){
uni.switchTab({
url
})
},
toPay(orderId) {
uni.navigateTo({
url: '/package/booking/confirm?id=' + orderId
@@ -246,6 +266,7 @@
.coupon {
.coupon-item {
width: 700rpx;
height: 140rpx;
margin: 20rpx auto;
border-radius: 12rpx;
border-bottom: 1px #eee solid;
@@ -268,6 +289,23 @@
}
}
.coupon-bg2{
width: 140rpx;
height: 140rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 26rpx;
color: #fff;
border-radius: 12rpx 0 0 12rpx;
background: linear-gradient(to right, #ffd87b, #f8a900);
.price {
font-size: 50rpx;
}
}
.coupon-info {
padding: 20rpx;
display: flex;
@@ -343,4 +381,8 @@
font-size: 30rpx !important;
}
}
.text-xs{
font-size: 25rpx;
}
</style>