hejianhao
2026-06-02 dc3299c828c704dc1f091cfa45daa79c5f915e29
refactor(release-route): 移除废弃代码
1个文件已修改
6 ■■■■■ 已修改文件
src/robotaxi/pages/begin-route/components/release-route.tsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/release-route.tsx
@@ -37,16 +37,10 @@
    const hasDiscountAmount = !isOperateFree && Number(fareEstimate?.discountAmount || 0) > 0;
    const formatDiscountAmountText = () => {
        const couponType = Number(fareEstimate?.couponType);
        const discountAmount = Number(fareEstimate?.discountAmount || 0);
        if (!Number.isFinite(discountAmount) || discountAmount <= 0) {
            return '0元';
        }
        // 折扣券接口返回 0.6 表示 6 折,这里统一转换为用户可读文案
        // if (couponType === 1) {
        //     const discountValue = fareEstimate?.couponMoney;
        //     return `${Number.isInteger(discountValue) ? discountValue : discountValue.toFixed(1).replace(/\.0$/, '')}折`;
        // }
        return `${discountAmount}元`;
    };