hejianhao
2026-06-02 77110ae1ea388943a817c4f314fb9cf0678ba3e7
fix(robotaxi): 修复折扣金额和优惠券显示问题

- 修正release-route组件的折扣金额展示逻辑,格式化后保留两位小数
- 优化expense-detail页面优惠券显示条件,仅在实际有优惠时展示条目
- 调整expense-detail页面的JSX缩进以提升可读性
2个文件已修改
14 ■■■■■ 已修改文件
src/robotaxi/pages/begin-route/components/release-route.tsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/expense-detail/index.tsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/release-route.tsx
@@ -41,7 +41,7 @@
        if (!Number.isFinite(discountAmount) || discountAmount <= 0) {
            return '0元';
        }
        return `${discountAmount}元`;
        return `${parseFloat(discountAmount.toFixed(2))}元`;
    };
    useEffect(() => {
src/robotaxi/pages/expense-detail/index.tsx
@@ -138,12 +138,12 @@
          </View>
        }
        {
          (pricingCard.coupon && pricingCard.coupon > 0) ?
          <View className='flex-between-card'>
            <View className='price-label'>优惠券</View>
            <View className='price-value color-red'>-{pricingCard.startPriceStr - pricingCard.finalFareStr}元</View>
          </View>
          : null
          (pricingCard.coupon && pricingCard.coupon > 0 && (pricingCard.startPriceStr != pricingCard.finalFareStr)) ?
            <View className='flex-between-card'>
              <View className='price-label'>优惠券</View>
              <View className='price-value color-red'>-{pricingCard.startPriceStr - pricingCard.finalFareStr}元</View>
            </View>
            : null
        }
        {
          (pricingCard.systemDiscount && pricingCard.systemDiscount > 0) ?