fix:优惠券卡片显示字段条件判断

pull/8/head
kele 2023-02-07 15:56:01 +08:00
parent 6885d6de69
commit b72d358909
4 changed files with 19 additions and 11 deletions

View File

@ -19,6 +19,7 @@
:title="item.amount_text"
:value="item.amount"
:surplus="item.stock"
:type="item.type"
:sellBy="`${item.get_start_time.substring(0, 10)}${item.get_end_time.substring(
0,
10,
@ -56,6 +57,7 @@
:value="item.amount"
:surplus="item.stock"
:couponId="item.id"
:type="item.type"
:sellBy="`${item.get_start_time.substring(0, 10)}${item.get_end_time.substring(
0,
10,
@ -93,6 +95,7 @@
:value="item.amount"
:surplus="item.stock"
:couponId="item.id"
:type="item.type"
:sellBy="`${item.get_start_time.substring(0, 10)}${item.get_end_time.substring(
0,
10,

View File

@ -71,6 +71,7 @@
.menu-item {
height: 160rpx;
position: relative;
z-index: 10;
.menu-title {
font-size: 24rpx;
line-height: 24rpx;

View File

@ -189,7 +189,7 @@
.cart-btn {
position: absolute;
bottom: 10rpx;
right: 10rpx;
right: 20rpx;
z-index: 11;
height: 50rpx;
line-height: 50rpx;

View File

@ -11,10 +11,10 @@
})
"
>
<view class=" ss-flex ss-flex-col ss-row-center ss-col-center">
<view class="ss-flex ss-flex-col ss-row-center ss-col-center">
<view class="face-value-box ss-flex ss-col-bottom ss-m-t-50 ss-m-b-28">
<view class="value-text ss-m-r-4">{{ props.value }}</view>
<view class="value-unit"></view>
<view class="value-text ss-m-r-4">{{ type === 'reduce' ? value : Number(value) }}</view>
<view class="value-unit">{{ type === 'reduce' ? '' : '折' }}</view>
</view>
<view class="title-text">{{ props.title }}</view>
</view>
@ -38,8 +38,8 @@
>
<view class="card-left ss-flex ss-flex-col ss-row-between ss-col-top ss-m-l-40">
<view class="face-value-box ss-flex ss-col-bottom ss-m-t-28">
<view class="value-unit"></view>
<view class="value-text ss-m-r-4">{{ props.value }}</view>
<view class="value-text ss-m-r-4">{{ type === 'reduce' ? value : Number(value) }}</view>
<view class="value-unit">{{ type === 'reduce' ? '元' : '折' }}</view>
</view>
<view class="ss-m-b-28">
<view class="title-text ss-m-b-10">{{ props.title }}</view>
@ -68,8 +68,8 @@
>
<view class="card-left ss-flex ss-flex-col ss-row-between ss-col-top ss-m-l-40">
<view class="face-value-box ss-flex ss-col-bottom ss-m-t-28">
<view class="value-unit"></view>
<view class="value-text ss-m-r-4">{{ props.value }}</view>
<view class="value-text ss-m-r-4">{{ type === 'reduce' ? value : Number(value) }}</view>
<view class="value-unit">{{ type === 'reduce' ? '元' : '折' }}</view>
</view>
<view class="ss-m-b-20">
<view class="title-text ss-m-b-10">{{ props.title }}</view>
@ -161,6 +161,10 @@
type: [Number, String],
default: 1000,
},
type: {
type: String,
default: '',
},
});
const cardStyle = computed(() => {
@ -189,7 +193,7 @@
.value-unit {
color: v-bind('textColor');
font-size: 24rpx;
line-height: 30rpx;
line-height: 38rpx;
}
.title-text {
@ -238,7 +242,7 @@
.value-unit {
color: v-bind('textColor');
font-size: 22rpx;
line-height: 22rpx;
line-height: 28rpx;
}
.title-text,
@ -285,7 +289,7 @@
.value-unit {
color: v-bind('textColor');
font-size: 22rpx;
line-height: 22rpx;
line-height: 32rpx;
}
.title-text,