卢春龙
2026-07-28 39d976774d79a24a191d6a7520d9428b0974b454
Merge branch 'feature_v2.4.0_ui_freetext' into 'feature_v2.4.0_ui'

feat(fare): 支持动态展示测试期间免费文案

See merge request robotaxi1/xp-robotaxi-miniprogram!192
6个文件已修改
26 ■■■■■ 已修改文件
src/robotaxi/pages/begin-route/components/calling-car-modules/fare-detail-card.tsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/css-folder/modify-destination-review.less 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/css-folder/release-route.less 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/modify-destination-review.tsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/release-route.tsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/hooks/use-route-request.ts 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/calling-car-modules/fare-detail-card.tsx
@@ -72,7 +72,7 @@
                    {
                        fareBreakdown?.operateFree == 1 ?
                            <View className="car-card-end-particulars-free">
                                员工内部测试
                                {fareBreakdown?.freeText || "员工内部测试"}
                            </View>
                            :
                            <View className="car-card-end-particulars-money" onClick={handleToggleDetail}>
src/robotaxi/pages/begin-route/components/css-folder/modify-destination-review.less
@@ -192,8 +192,9 @@
  &-operate-free {
    font-size: 28px;
    font-weight: 500;
    line-height: 40px;
    color: #f58900;
    color: #A68042;
  }
  .modify-destination-review-fare-num {
src/robotaxi/pages/begin-route/components/css-folder/release-route.less
@@ -381,8 +381,9 @@
                .route-operate-free {
                    font-size: 28px;
                    font-weight: 500;
                    line-height: 40px;
                    color: #F58900;
                    color: #A68042;
                }
                .route-content-top-money {
src/robotaxi/pages/begin-route/components/modify-destination-review.tsx
@@ -383,7 +383,7 @@
              <View className="modify-destination-review-fare">
                {isOperateFree ? (
                  <View className="modify-destination-review-operate-free">
                    员工内部测试
                    {selectedRoute?.freeText || "员工内部测试"}
                  </View>
                ) : (
                  <View>
src/robotaxi/pages/begin-route/components/release-route.tsx
@@ -268,7 +268,7 @@
                    <View className="confirm-btn-box-content">
                        <View className="money-box">
                            {isOperateFree ? (
                                <View className="route-operate-free">员工内部测试</View>
                                <View className="route-operate-free">{selectedRoute?.freeText || "员工内部测试"}</View>
                            ) : (
                                <View className="route-content-top-money" onClick={() => toPriceDescription()} >
                                    <View className="forecast-text">
src/robotaxi/pages/begin-route/hooks/use-route-request.ts
@@ -119,11 +119,14 @@
  item: any,
  snapshotId: any,
  generatedAtMillis: any,
  responseOriginalFare?: any
  responseOriginalFare?: any,
  responseFreeText?: any
) => {
  const normalizedTopLevelOriginalFare = Number(responseOriginalFare);
  return {
    ...(item || {}),
    // 顶层免费文案(与顶层 operateFree 同级)兜底透传到每条路线,供免费态展示;路线自带 freeText 时优先使用
    freeText: item?.freeText ?? responseFreeText,
    fareEstimate: {
      ...(item?.fareEstimate || {}),
      ...(Number.isFinite(normalizedTopLevelOriginalFare)
@@ -436,6 +439,7 @@
      const responseSnapshotId = response?.snapshotId;
      const responseGeneratedAtMillis = response?.generatedAtMillis;
      const responseOriginalFare = response?.originalFare;
      const responseFreeText = response?.freeText;
      let options: any[] = [];
      if (responseRoutes.length > 0) {
@@ -443,17 +447,19 @@
          item,
          responseSnapshotId,
          responseGeneratedAtMillis,
          responseOriginalFare
          responseOriginalFare,
          responseFreeText
        ));
      } else if (Array.isArray(response) && response.length > 0) {
        options = response.map((item: any) => normalizeRouteOption(
          item,
          responseSnapshotId,
          responseGeneratedAtMillis,
          responseOriginalFare
          responseOriginalFare,
          responseFreeText
        ));
      } else if (response) {
        options = [normalizeRouteOption(response, responseSnapshotId, responseGeneratedAtMillis, responseOriginalFare)];
        options = [normalizeRouteOption(response, responseSnapshotId, responseGeneratedAtMillis, responseOriginalFare, responseFreeText)];
      }
      let routeData = options[0] || null;