liaof
2026-07-27 4b8ee85c5acd80a5feb7842678ffbc2cd43f3b45
Merge branch 'feature_v2.3.3' into 'feature_v2.4.0'

fix: 一些bug的修复

See merge request robotaxi1/xp-robotaxi-miniprogram!176
8个文件已修改
61 ■■■■■ 已修改文件
src/robotaxi/pages/begin-route/hooks/use-order-cancel.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/hooks/use-page-actions.ts 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/index.tsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/operating-area/index.less 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/operating-area/index.tsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/order/index.tsx 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/passenger-notice/index.tsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/utils/login-agreement.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/hooks/use-order-cancel.ts
@@ -176,7 +176,7 @@
   */
  const handleOpenCancelPopupByTripStatus = (status: TripStatus, displayInfo?: any) => {
    const waitMinutes = Number(displayInfo?.waitMinutes);
    if (status === TripStatus.VehicleApproaching && Number.isFinite(waitMinutes)) {
    if ([TripStatus.CallingCar, TripStatus.VehicleApproaching].includes(status) && Number.isFinite(waitMinutes)) {
      deps.setCancelPopupWaitMinutes(waitMinutes);
    } else {
      deps.setCancelPopupWaitMinutes(null);
src/robotaxi/pages/begin-route/hooks/use-page-actions.ts
@@ -18,6 +18,7 @@
type Deps = {
  tripStatus: TripStatus;
  startSite: any;
  returnSource?: string;
  getCheckedEnter: () => boolean;
  setCheckedEnter: (checked: boolean) => void;
  onBeforeBack?: () => void;
@@ -93,13 +94,21 @@
  };
  /**
   * 返回首页并清理必要缓存。
   * 根据来源返回上一页或首页,并清理必要缓存。
   */
  const toBack = () => {
    deps.onBeforeBack?.();
    Taro.removeStorageSync('selectedCouponId');
    clearModifyDestinationStorage();
    clearPassedRouteCache();
    if (deps.returnSource === 'order') {
      if (deps.tripStatus === TripStatus.PaymentSuccess || deps.tripStatus === TripStatus.PublishRoute) {
        clearOrderTripStorage();
        Taro.removeStorageSync('endSite');
      }
      Taro.navigateBack();
      return;
    }
    if (deps.tripStatus === TripStatus.PaymentSuccess || deps.tripStatus === TripStatus.PublishRoute) {
      if (deps.tripStatus === TripStatus.PublishRoute) {
        retainStartSiteForNextHome();
src/robotaxi/pages/begin-route/index.tsx
@@ -419,6 +419,7 @@
  }, []);
  const shouldShowWaitingRadar = isAndroid && [TripStatus.Publishing, TripStatus.CallingCar].includes(tripStatus); // 是否显示等待雷达动画(Android 且处于发布中/呼叫车中)
  const vehicleMarkerId = !isAndroid && tripStatus === TripStatus.InService ? 30 : 3; // 车辆标记 ID,iOS 行驶中阶段使用不同 ID
  const router = Taro.useRouter();
  const {
    customCalloutIconSrc,
    waitingRadarSrc,
@@ -443,6 +444,7 @@
  } = usePageActions({
    tripStatus,
    startSite,
    returnSource: router?.params?.from,
    getCheckedEnter: () => isCheckedEnter.current,
    setCheckedEnter: (checked) => {
      isCheckedEnter.current = checked;
@@ -1232,7 +1234,6 @@
    getCurrentVehicleLocation: () => vehicleLocation,
    updatePickupRouteChangeEligibleOrder
  }); // 页面恢复与初始化编排
  const router = Taro.useRouter();
  const tripRuntime = useTripRuntime({
    waitingTimerStartKey: WAITING_TIMER_START_KEY,
    waitingTimerElapsedKey: WAITING_TIMER_ELAPSED_KEY,
src/robotaxi/pages/operating-area/index.less
@@ -123,7 +123,7 @@
      border-radius: 24px;
      padding: 32rpx 32rpx 36rpx 32rpx;
      box-sizing: border-box;
      height: 410rpx;
      max-height: 410rpx;
      overflow: auto;
      .content-title {
src/robotaxi/pages/operating-area/index.tsx
@@ -11,7 +11,7 @@
const DEFAULT_MAP_LONGITUDE = 116.397128;
const DEFAULT_MAP_LATITUDE = 39.916527;
const MAP_INCLUDE_POINTS_PADDING = [10, 10, 10, 10];
const MAP_INCLUDE_POINTS_PADDING = [120, 10, 50, 10];
// includePoints 缩放动画的预估时长,动画结束后再显示地图,避免“先展示再放大”的跳动
const MAP_FIT_ANIMATION_DURATION = 700;
const POLYGON_STROKE_COLOR = '#DFB369'; // rgb(223, 179, 105)
@@ -348,7 +348,7 @@
        // scale={30}
        polygons={polygons}
        showLocation={false}
        style={{ width: '100%', height: '65%' }}
        style={{ width: '100%', height: '70%' }}
        onPolygonTap={handlePolygonTap}
        onTap={handleMapTap}
      >
@@ -395,14 +395,14 @@
            </View>
            <View className="content-desc">
              <View className="desc-item">
                <Text className="text">1. 运营时间内可正常使用打车服务,超出运营时间无法使用打车功能</Text>
                <Text className="text">各站点运营时间可能存在调整,实际运营情况请以页面实时展示为准</Text>
              </View>
               <View className="desc-item">
               {/* <View className="desc-item">
                <Text className="text">2. 各站点运营时间可能存在差异,站点运营情况请依照实际情况</Text>
              </View>
               <View className="desc-item">
                <Text className="text">3. 有问题可联系区域负责人,联系电话:4008208820</Text>
              </View>
              </View> */}
            </View>
          </View>
        </View>
src/robotaxi/pages/order/index.tsx
@@ -7,6 +7,12 @@
  OrderHistoryGroup
} from "../../../robotaxi/api/order";
import { _INVOICE_CHARGE_URL } from "../../../constants/api";
import {
  clearOrderTripStorage,
  mapOrderStatusToTripStatus
} from "../../../utils/Robotaxi-public-method";
// import { hasActiveTripOrderInStorage } from "../../../utils/order";
import { hasActiveTripOrderInStorage } from '../../utils/order';
type OrderFilterKey = "all" | "pendingPay" | "completed" | "cancelled";
@@ -134,8 +140,13 @@
      formatOrderStatus(item.status) == "进行中" ||
      formatOrderStatus(item.status) == "待支付"
    ) {
      Taro.setStorageSync("orderId", item.orderId || "");
      Taro.setStorageSync(
        "tripStatus",
        mapOrderStatusToTripStatus(item.status || 1)
      );
      Taro.navigateTo({
        url: "/robotaxi/pages/begin-route/index"
        url: "/robotaxi/pages/begin-route/index?from=order"
      });
      return;
    }
@@ -145,6 +156,13 @@
  };
  const againOrder = (item: any) => {
    if (hasActiveTripOrderInStorage()) {
      Taro.navigateTo({
        url: "/robotaxi/pages/begin-route/index?from=order"
      });
      return;
    }
    Taro.setStorageSync("startSite", {
      id: item.startPointId || "",
      name: item.startPointName || "",
@@ -161,8 +179,9 @@
      electronicAreaId: item.xpElectronicFenceAreaId || "",
      time: item.endParkingTimeLimit || 0
    });
    clearOrderTripStorage();
    Taro.navigateTo({
      url: "/robotaxi/pages/begin-route/index"
      url: "/robotaxi/pages/begin-route/index?from=order"
    });
  };
@@ -298,7 +317,7 @@
                        <View
                          onClick={e => {
                            e.stopPropagation();
                            againOrder(item);
                            toOrderDetail(item);
                          }}
                        >
                          <View
src/robotaxi/pages/passenger-notice/index.tsx
@@ -14,7 +14,7 @@
function PassengerNotice() {
  const [content, setContent] = useState('');
  // const [title, setTitle] = useState('乘车须知');
  const [title, setTitle] = useState('乘车须知');
  const RIDE_NOTICE_TYPE = 5; // 乘车须知协议类型
  const normalizeContent = (rawContent: string) => {
@@ -51,7 +51,7 @@
    getLoginAgreementContentInfo(typeParam || '').then((res: any) => {
      const target = resolveAgreementItem(res);
      if (target) {
        // setTitle(String(target.name || '乘车须知'));
        setTitle(String(target.name || '乘车须知'));
        setContent(normalizeContent(target.content || ''));
        console.log('normalizeContent(target.content ||', normalizeContent(target.content || ''));
        return;
@@ -64,7 +64,7 @@
  return (
    <View className='passenger-notice'>
      {/* <View className="passenger-notice-title">{title}</View> */}
      <View className="passenger-notice-title">{title}</View>
      <View className="passenger-notice-content">
        <RichText nodes={content} />
      </View>
src/robotaxi/utils/login-agreement.ts
@@ -56,5 +56,5 @@
      ...normalized.slice(insertIndex),
    ];
  }
  return [...normalized, RIDE_NOTICE_ITEM];
  return [...normalized];
};