From f086b9c32b172016341126f9fa54e120b89c4ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=97=B4=E8=B4=A7?= <252048765@qq.com> Date: Sun, 15 Sep 2024 16:37:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=87=E5=AE=9A=E5=8F=91?= =?UTF-8?q?=E6=94=BE=E4=BC=98=E6=83=A0=E5=88=B8=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/promotion/coupon/formatter.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/views/mall/promotion/coupon/formatter.ts b/src/views/mall/promotion/coupon/formatter.ts index 56b11402..d7382e69 100644 --- a/src/views/mall/promotion/coupon/formatter.ts +++ b/src/views/mall/promotion/coupon/formatter.ts @@ -16,10 +16,15 @@ export const discountFormat = (row: CouponTemplateVO) => { // 格式化【领取上限】 export const takeLimitCountFormat = (row: CouponTemplateVO) => { - if (row.takeLimitCount === -1) { - return '无领取限制' + if(row.takeLimitCount){ + if (row.takeLimitCount === -1) { + return '无领取限制' + } + return `${row.takeLimitCount} 张/人` + }else{ + return ' ' } - return `${row.takeLimitCount} 张/人` + } // 格式化【有效期限】