Commit 0f435030 by YunaiV

feat:【商城】店铺装修-优惠劵:完善优惠描述、剩余数量

parent 3b0ab0d7
...@@ -43,7 +43,7 @@ export const CouponDiscountDesc = defineComponent({ ...@@ -43,7 +43,7 @@ export const CouponDiscountDesc = defineComponent({
const discountDesc = const discountDesc =
coupon.discountType === PromotionDiscountTypeEnum.PRICE.type coupon.discountType === PromotionDiscountTypeEnum.PRICE.type
? `减${floatToFixed2(coupon.discountPrice)}元` ? `减${floatToFixed2(coupon.discountPrice)}元`
: `打${coupon.discountPercent}折` : `打${coupon.discountPercent / 10.0}折`
return () => ( return () => (
<div> <div>
<span>{useCondition}</span> <span>{useCondition}</span>
......
...@@ -49,7 +49,13 @@ ...@@ -49,7 +49,13 @@
<div class="flex flex-col justify-evenly gap-4px"> <div class="flex flex-col justify-evenly gap-4px">
<!-- 优惠值 --> <!-- 优惠值 -->
<CouponDiscount :coupon="coupon" /> <CouponDiscount :coupon="coupon" />
<div>{{ coupon.name }}</div> <!-- 优惠描述 -->
<CouponDiscountDesc :coupon="coupon" />
<!-- 领取说明 -->
<div v-if="coupon.totalCount >= 0">
仅剩:{{ coupon.totalCount - coupon.takeCount }}
</div>
<div v-else-if="coupon.totalCount === -1">仅剩:不限制</div>
</div> </div>
<div class="flex flex-col"> <div class="flex flex-col">
<div <div
...@@ -67,7 +73,8 @@ ...@@ -67,7 +73,8 @@
<div v-else class="flex flex-col items-center justify-around gap-4px p-4px"> <div v-else class="flex flex-col items-center justify-around gap-4px p-4px">
<!-- 优惠值 --> <!-- 优惠值 -->
<CouponDiscount :coupon="coupon" /> <CouponDiscount :coupon="coupon" />
<div>{{ coupon.name }}</div> <!-- 优惠描述 -->
<CouponDiscountDesc :coupon="coupon" />
<div <div
class="rounded-20px p-x-8px p-y-2px" class="rounded-20px p-x-8px p-y-2px"
:style="{ :style="{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment