diff --git a/web/src/helpers/render.jsx b/web/src/helpers/render.jsx index a304802..4673722 100644 --- a/web/src/helpers/render.jsx +++ b/web/src/helpers/render.jsx @@ -1504,16 +1504,14 @@ function formatBillingDisplayPrice(usdAmount, rate, digits = 2) { } /** - * 计费过程总额专用格式化:正常金额保持 2 位小数;极小金额(< 0.005)自动提升至 6 位小数, - * 避免因 toFixed(2) 归零导致「计费过程」显示为 0。 + * 计费过程总额专用格式化:始终保留 2 位小数与列表显示一致; + * 正数金额经 toFixed(2) 归零时保底为 0.01,避免「= $0」但列表却有花费的不一致。 */ function formatBillingTotalDisplay(usdAmount, rate) { const raw = usdAmount * rate; if (raw <= 0) return 0; const fixed2 = Number(raw.toFixed(2)); - if (fixed2 > 0) return fixed2; - const fixed6 = Number(raw.toFixed(6)); - return fixed6 > 0 ? fixed6 : 0; + return fixed2 > 0 ? fixed2 : 0.01; } function buildBillingText(key, vars) {