Skip to content

Commit 0f43503

Browse files
committed
feat:【商城】店铺装修-优惠劵:完善优惠描述、剩余数量
1 parent 3b0ab0d commit 0f43503

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/components/DiyEditor/components/mobile/CouponCard/component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const CouponDiscountDesc = defineComponent({
4343
const discountDesc =
4444
coupon.discountType === PromotionDiscountTypeEnum.PRICE.type
4545
? `减${floatToFixed2(coupon.discountPrice)}元`
46-
: `打${coupon.discountPercent}折`
46+
: `打${coupon.discountPercent / 10.0}折`
4747
return () => (
4848
<div>
4949
<span>{useCondition}</span>

src/components/DiyEditor/components/mobile/CouponCard/index.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@
4949
<div class="flex flex-col justify-evenly gap-4px">
5050
<!-- 优惠值 -->
5151
<CouponDiscount :coupon="coupon" />
52-
<div>{{ coupon.name }}</div>
52+
<!-- 优惠描述 -->
53+
<CouponDiscountDesc :coupon="coupon" />
54+
<!-- 领取说明 -->
55+
<div v-if="coupon.totalCount >= 0">
56+
仅剩:{{ coupon.totalCount - coupon.takeCount }}张
57+
</div>
58+
<div v-else-if="coupon.totalCount === -1">仅剩:不限制</div>
5359
</div>
5460
<div class="flex flex-col">
5561
<div
@@ -67,7 +73,8 @@
6773
<div v-else class="flex flex-col items-center justify-around gap-4px p-4px">
6874
<!-- 优惠值 -->
6975
<CouponDiscount :coupon="coupon" />
70-
<div>{{ coupon.name }}</div>
76+
<!-- 优惠描述 -->
77+
<CouponDiscountDesc :coupon="coupon" />
7178
<div
7279
class="rounded-20px p-x-8px p-y-2px"
7380
:style="{

0 commit comments

Comments
 (0)