mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
后端 ent 模型 PaymentOrder.FeeRate 带 omitempty,fee_rate=0 的订单 在 JSON 序列化时该字段会被剔除。前端 baseAmount 计算用 `fee_rate <= 0` 判断走分支,但 `undefined <= 0` 为 false,因此进入除法分支得到 NaN。 将 fee_rate 通过 Number(...) || 0 归一化,使缺失字段等价于 0。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>