From 645c1abad414e297e4be4577f2a66153f341720a Mon Sep 17 00:00:00 2001 From: yeweikangxx123 <317226901@qq.com> Date: Wed, 23 Jul 2025 23:41:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(util):=20=E7=B2=BE=E5=BA=A6=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/index.js b/util/index.js index cf59e00..815cfb5 100644 --- a/util/index.js +++ b/util/index.js @@ -104,10 +104,10 @@ function formatCurrency(value) { // 判断是否有小数部分 if (truncated % 1 === 0) { // 整数,不显示小数位,但添加千分位分隔符 - return addThousandSeparator(truncated) + return addThousandSeparator(numValue) } else { // 有小数,保留两位,并为整数部分添加千分位分隔符 - const fixedValue = truncated.toFixed(2) + const fixedValue = numValue.toFixed(2) const parts = fixedValue.split('.') parts[0] = addThousandSeparator(parts[0]) return parts.join('.')