lucl
2026-08-13 67b8af1600dbd0dcb5cdba6d91952612bc1e03b4
feat: 优化 toast 展示,使用自定义 toast
19个文件已修改
191 ■■■■■ 已修改文件
src/pages/robotaxi/home/components/privacy-popup/index.tsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/robotaxi/home/hooks/use-marketing.ts 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/robotaxi/home/hooks/use-navigation.ts 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/robotaxi/home/hooks/use-origin-action.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/robotaxi/home/hooks/use-quick-capsule.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/robotaxi/home/index.tsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/components/demo/index.tsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/calling-car-modules/door-trunk-control.tsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/hooks/use-credit-pay-return.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/hooks/use-modify-destination-flow.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/hooks/use-order-payment-result-query.ts 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/hooks/use-order-payment.ts 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/hooks/use-order-submit.ts 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/index.tsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/coupon/index.tsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/feedback/hooks/use-media-upload.ts 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/feedback/index.tsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/payment-setting-detail/index.tsx 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/personal-center/index.tsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/robotaxi/home/components/privacy-popup/index.tsx
@@ -4,6 +4,7 @@
import './index.less';
import { privicyShowManager } from './utils'
import { submitAgreement } from '../../../../../robotaxi/api/home'
import { showToast } from '../../../../../robotaxi/components/toast'
import { getNormalizedLoginAgreementList, type LoginAgreementItem } from '../../../../../robotaxi/utils/login-agreement'
import { reportEvent } from '../../../../../utils/Robotaxi-public-method'
import { PROTOCOL_CLICK_EVENT_ID } from '../../../../../robotaxi/constants/report-events'
@@ -32,7 +33,7 @@
      }, {});
      setIsAgree(initState);
    }).catch(() => {
      Taro.showToast({ title: '协议获取失败,请重试', icon: 'none' });
      showToast({ title: '协议获取失败,请重试', icon: 'none' });
    });
  };
@@ -97,7 +98,7 @@
  const handleAgree = () => {
    if (!isAllAgree) {
      Taro.showToast({ title: '请先同意全部协议', icon: 'none' });
      showToast({ title: '请先同意全部协议', icon: 'none' });
      return
    };
    const selectedType = Object.keys(isAgree)
@@ -113,7 +114,7 @@
      privicyShowManager.setHasShow(true)
      onAgree?.();
    }).catch(() => {
      Taro.showToast({ title: '提交失败,请重试', icon: 'none' });
      showToast({ title: '提交失败,请重试', icon: 'none' });
    });
  };
src/pages/robotaxi/home/hooks/use-marketing.ts
@@ -1,5 +1,5 @@
import Taro from '@tarojs/taro';
import { useState } from 'react';
import { showToast } from '../../../../robotaxi/components/toast';
import { FLOAT_ACTIVITY_DEFAULT_IMAGE } from '../constants';
type MarketingData = Record<string, any>;
@@ -163,7 +163,7 @@
   */
  const handleFloatActivityClick = () => {
    if (!floatActivityUrl) {
      Taro.showToast({ title: '活动页面建设中', icon: 'none' });
      showToast({ title: '活动页面建设中', icon: 'none' });
      return;
    }
    deps.toH5(floatActivityUrl, true);
src/pages/robotaxi/home/hooks/use-navigation.ts
@@ -24,6 +24,7 @@
  writeConfirmRideSiteSourceType
} from '../../../../robotaxi/constants/confirm-ride-report';
import { resolveHomeStartSiteDisplaySite } from '../../../../robotaxi/hooks/use-home-start-site-display';
import { showToast } from '../../../../robotaxi/components/toast';
type Deps = {
  /** 是否未登录 */
@@ -124,12 +125,12 @@
    try {
      const res = await Taro.getNetworkType();
      if (res?.networkType === 'none') {
        Taro.showToast({ title: '网络未连接', icon: 'none' });
        showToast({ title: '网络未连接', icon: 'none' });
        return false;
      }
      return true;
    } catch (e) {
      Taro.showToast({ title: '网络未连接', icon: 'none' });
      showToast({ title: '网络未连接', icon: 'none' });
      return false;
    }
  };
@@ -176,11 +177,11 @@
    const ok = await ensureNetwork();
    if (!ok) return;
    if (deps.isLocationAuthDenied) {
      Taro.showToast({ title: '请先开启定位权限', icon: 'none' });
      showToast({ title: '请先开启定位权限', icon: 'none' });
      return;
    }
    if (!deps.electronicAreaId) {
      Taro.showToast({ title: '请先移动到运营区内', icon: 'none' });
      showToast({ title: '请先移动到运营区内', icon: 'none' });
      return;
    }
    if (isToMapStart) {
@@ -197,7 +198,7 @@
      const preferredStartSite = resolveHomeStartSiteDisplaySite();
      const effectiveStartSite = preferredStartSite || deps.currentSite;
      if (!effectiveStartSite || !effectiveStartSite.id) {
        Taro.showToast({ title: '请先选择起点站点', icon: 'none' });
        showToast({ title: '请先选择起点站点', icon: 'none' });
        return;
      }
      Taro.setStorageSync('startSite', effectiveStartSite);
@@ -223,7 +224,7 @@
    const startLongitude = hasValidSiteCoord ? siteLongitude : (hasValidMapCoord ? mapLongitude : null);
    const startLatitude = hasValidSiteCoord ? siteLatitude : (hasValidMapCoord ? mapLatitude : null);
    if (startLongitude === null || startLatitude === null) {
      Taro.showToast({ title: '请先移动到运营区内', icon: 'none' });
      showToast({ title: '请先移动到运营区内', icon: 'none' });
      return;
    }
    Taro.navigateTo({
@@ -321,7 +322,7 @@
    if (!ok) return;
    if (deps.isLocationAuthDenied) return;
    if (!deps.selectedCity?.code) {
      Taro.showToast({ title: '此城市暂未开通运营区域', icon: 'none' });
      showToast({ title: '此城市暂未开通运营区域', icon: 'none' });
      return;
    }
    let nextPolygons = deps.polygons;
@@ -341,7 +342,7 @@
      deps.setPolygons([]);
    }
    if (!nextPolygons || nextPolygons.length === 0) {
      Taro.showToast({ title: '此城市暂未开通运营区域', icon: 'none' });
      showToast({ title: '此城市暂未开通运营区域', icon: 'none' });
      return;
    }
    const points = extractPointsFromPolygons(nextPolygons);
@@ -358,7 +359,7 @@
        });
      }, 600);
    } else {
      Taro.showToast({ title: '此城市暂未开通运营区域', icon: 'none' });
      showToast({ title: '此城市暂未开通运营区域', icon: 'none' });
    }
  };
src/pages/robotaxi/home/hooks/use-origin-action.ts
@@ -1,4 +1,5 @@
import Taro from '@tarojs/taro';
import { showToast } from '../../../../robotaxi/components/toast';
type Deps = {
  /** 是否拒绝定位 */
@@ -37,7 +38,7 @@
  const toOrigin = async () => {
    const systemSetting = await Promise.resolve((Taro as any).getSystemSetting?.());
    if (systemSetting?.locationEnabled === false) {
      Taro.showToast({ title: '需开启设备定位服务开关', icon: 'none' });
      showToast({ title: '需开启设备定位服务开关', icon: 'none' });
      return;
    }
    if (deps.isLocationAuthDenied) return;
src/pages/robotaxi/home/hooks/use-quick-capsule.ts
@@ -14,6 +14,7 @@
  OrderDistanceConfig
} from '../../../../robotaxi/utils/order-distance';
import { hasActiveTripOrderInStorage } from '../../../../robotaxi/utils/order';
import { showToast } from '../../../../robotaxi/components/toast';
type CapsuleSite = {
  id: string | number;
@@ -142,16 +143,16 @@
   */
  const handleQuickCapsuleClick = async () => {
    if (hasActiveTripOrderInStorage()) {
      Taro.showToast({ title: '您已有进行中的订单', icon: 'none' });
      showToast({ title: '您已有进行中的订单', icon: 'none' });
      return;
    }
    const targetStartSite = resolveValidStartSite();
    if (!targetStartSite) {
      Taro.showToast({ title: '请先选择起点站点', icon: 'none' });
      showToast({ title: '请先选择起点站点', icon: 'none' });
      return;
    }
    if (!capsuleSite) {
      Taro.showToast({ title: '暂无快捷目的地', icon: 'none' });
      showToast({ title: '暂无快捷目的地', icon: 'none' });
      return;
    }
    const distanceConfig = await ensureDistanceConfigReady();
@@ -160,7 +161,7 @@
      endSite: capsuleSite,
      minDistance: distanceConfig?.minDistance
    })) {
      Taro.showToast({ title: ORDER_DISTANCE_MIN_DISTANCE_TOAST, icon: 'none' });
      showToast({ title: ORDER_DISTANCE_MIN_DISTANCE_TOAST, icon: 'none' });
      return;
    }
    Taro.setStorageSync('endSite', capsuleSite);
src/pages/robotaxi/home/index.tsx
@@ -41,6 +41,7 @@
import { checkOtp, toH5 } from '../../../utils/tools';
import { getCityLocation, reportEvent } from '../../../utils/Robotaxi-public-method';
import { withRobotaxiWhitelist } from '../../../utils/whitelist';
import { withToast } from '../../../robotaxi/components/toast/with-toast';
import {
  HOME_MAP_ID,
  HOME_ORDER_STATUS,
@@ -636,4 +637,4 @@
  );
}
export default withRobotaxiWhitelist(Home);
export default withRobotaxiWhitelist(withToast(Home));
src/robotaxi/components/demo/index.tsx
@@ -1,4 +1,3 @@
import Taro from '@tarojs/taro'
import { PureComponent } from 'react'
import { View, Text } from '@tarojs/components'
import './index.less'
@@ -164,8 +163,8 @@
            fareEstimate={DEMO_MODIFY_FARE_ESTIMATE}
            routeOptions={DEMO_MODIFY_ROUTE_OPTIONS}
            selectedRouteIndex={0}
            onEditDestination={() => Taro.showToast({ title: '编辑目的地(Demo)', icon: 'none' })}
            onConfirm={() => Taro.showToast({ title: '确认修改(Demo)', icon: 'none' })}
            onEditDestination={() => showToast({ title: '编辑目的地(Demo)', icon: 'none' })}
            onConfirm={() => showToast({ title: '确认修改(Demo)', icon: 'none' })}
          />
        </View>
      </View>
src/robotaxi/pages/begin-route/components/calling-car-modules/door-trunk-control.tsx
@@ -4,7 +4,7 @@
import { unlockVehicle, queryVehicleTrunkOpenStatus } from '../../../../api/begin-route';
import { getOrderId } from '../../../../utils/order';
import { TripStatus } from '../../../../constants/trip-status';
import { showToast } from '../../../../components/toast';
import { showToast, hideToast } from '../../../../components/toast';
import useMinimumSpinLoading from './use-minimum-spin-loading';
import TrunkConfirmPopup from './trunk-confirm-popup';
@@ -93,13 +93,13 @@
    // 获取解锁请求所需定位参数,优先高精定位,失败后降级普通定位
    const getUnlockLocationPayload = async () => {
        Taro.showLoading({ title: '正在获取位置...', mask: true });
        showToast({ title: '正在获取位置...', icon: 'loading', mask: true });
        try {
            const location = await Taro.getLocation({ type: 'gcj02', isHighAccuracy: true });
            const longitude = Number(location?.longitude);
            const latitude = Number(location?.latitude);
            if (!Number.isNaN(longitude) && !Number.isNaN(latitude)) {
                Taro.hideLoading();
                hideToast();
                return { longitude, latitude };
            }
        } catch (error) {
@@ -111,14 +111,14 @@
            const longitude = Number(location?.longitude);
            const latitude = Number(location?.latitude);
            if (!Number.isNaN(longitude) && !Number.isNaN(latitude)) {
                Taro.hideLoading();
                hideToast();
                return { longitude, latitude };
            }
        } catch (error) {
            console.error('普通定位获取失败:', error);
        }
        Taro.hideLoading();
        hideToast();
        return null;
    };
@@ -144,7 +144,7 @@
        const actionLoadingText = doorType === 'trunk'
            ? (isCloseAction ? '正在关闭后备箱' : '正在开启后备箱')
            : '正在解锁车门';
        // Taro.showLoading({ title: actionLoadingText, mask: true });
        // showToast({ title: actionLoadingText, icon: 'loading', mask: true });
        unlockVehicle({
            orderId: targetOrderId,
            doorType,
@@ -157,7 +157,7 @@
                ? Number(res?.data) == 1
                : !!res?.data;
            if (!unlockSucceeded) {
                // Taro.hideLoading();
                // hideToast();
                const failMsg = res?.msg || '解锁失败,请重试或联系客服';
                stopLoading(doorType, () => {
                    showToast({ title: failMsg, icon: 'fail' });
@@ -187,7 +187,7 @@
                        trunkPollTimerRef.current = setTimeout(doPoll, pollInterval);
                    } else {
                        stopPolling();
                        // Taro.hideLoading();
                        // hideToast();
                        stopLoading(doorType, () => {
                            showToast({
                                title: failToastText,
@@ -222,7 +222,7 @@
                            const isOpen = !isCloseAction;
                            setTrunkStatus(isOpen);
                            onSuccess?.();
                            // Taro.hideLoading();
                            // hideToast();
                            stopLoading(doorType, () => {
                                showToast({
                                    title: successToastText,
@@ -240,7 +240,7 @@
            }
            if (doorType === 'door') {
                // Taro.hideLoading();
                // hideToast();
                syncDoorUnlockButtonUI();
                onSuccess?.();
                stopLoading(doorType, () => {
@@ -248,7 +248,7 @@
                });
            }
        }).catch(() => {
            // Taro.hideLoading();
            // hideToast();
            stopLoading(doorType, () => {
                showToast({ title: '解锁失败,请重试或联系客服', icon: 'fail' });
            });
src/robotaxi/pages/begin-route/hooks/use-credit-pay-return.ts
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useRef } from 'react';
import Taro from '@tarojs/taro';
import { showToast } from '../../../components/toast';
import { showToast, hideToast } from '../../../components/toast';
import { queryLedgerCreditOrderResult } from '../../../api/begin-route';
type Deps = {
@@ -61,7 +61,7 @@
    pollingOrderIdRef.current = '';
    clearPollingTimer();
    if (hideLoading) {
      Taro.hideLoading();
      hideToast();
    }
  }, [clearPollingTimer]);
@@ -143,7 +143,7 @@
        return;
      }
      Taro.showLoading({ title: '授权结果查询中', mask: true });
      showToast({ title: '授权结果查询中', icon: 'loading', mask: true });
      const maxPollingCount = 120;
      let currentPollingCount = 0;
@@ -169,7 +169,7 @@
          if (status === 'DOING' || result?.code === 20710) {
            stopPollingSession(true);
            Taro.showToast({ title: '授权成功', icon: 'none' });
            showToast({ title: '授权成功', icon: 'none' });
            void deps.onAuthorizedReturn(queryId);
            return;
          }
@@ -205,7 +205,7 @@
          if (errorCode === '20710') {
            console.log(`[信用分授权查询遇到20710] 第${currentPollingCount + 1}次,当作授权成功处理`);
            stopPollingSession(true);
            Taro.showToast({ title: '授权成功', icon: 'none' });
            showToast({ title: '授权成功', icon: 'none' });
            void deps.onAuthorizedReturn(queryId);
            return;
          }
src/robotaxi/pages/begin-route/hooks/use-modify-destination-flow.ts
@@ -1,5 +1,5 @@
import Taro from '@tarojs/taro';
import { showToast } from '../../../components/toast';
import { showToast, hideToast } from '../../../components/toast';
import { useEffect, useMemo, useState } from 'react';
import { orderChange } from '../../../api/begin-route';
import { TripStatus } from '../../../constants/trip-status';
@@ -385,7 +385,7 @@
    try {
      setIsConfirmingModifyDestination(true);
      setFlowState(FLOW_STATES.CONFIRMING);
      Taro.showLoading({ title: '正在修改目的地', mask: true }); // 修改目的地请求进行中全局 loading
      showToast({ title: '正在修改目的地', icon: 'loading', mask: true }); // 修改目的地请求进行中全局 loading
      // 如果后端需要字符串格式可以显式转String,如果后端支持number直接传值,保留原始格式防止隐式转换截断
      // 如果原本因为 Number() 导致大整数丢失精度,去掉 Number() 即可
@@ -416,7 +416,7 @@
      exitModifyDestinationReview({ shouldRestorePreviousEndSite: false });
      Taro.hideLoading();
      hideToast();
      showToast({
        title: '行程已更新',
        icon: 'none'
@@ -426,7 +426,7 @@
        deps.onModifySuccess(oldRoutePoints);
      }
    } catch (e: any) {
      Taro.hideLoading();
      hideToast();
      throw e;
    } finally {
      setIsConfirmingModifyDestination(false);
src/robotaxi/pages/begin-route/hooks/use-order-payment-result-query.ts
@@ -1,6 +1,5 @@
import { useCallback } from 'react';
import Taro from '@tarojs/taro';
import { showToast } from '../../../components/toast';
import { showToast, hideToast } from '../../../components/toast';
import { queryOrderPaymentResultFromOrderId } from '../../../api/begin-route';
import { RobotaxiOrderStatus } from '../../../api/types/begin-route';
@@ -24,7 +23,7 @@
      return;
    }
    Taro.showLoading({ title: '支付结果查询中' });
    showToast({ title: '支付结果查询中', icon: 'loading' });
    try {
      const result = await queryOrderPaymentResultFromOrderId(deps.orderId);
      const nextStatus = Number(result?.status);
@@ -43,7 +42,7 @@
    } catch (error) {
      showToast({ title: '支付结果查询失败,请稍后重试', icon: 'none' });
    } finally {
      Taro.hideLoading();
      hideToast();
    }
  }, [deps.onPaySuccess, deps.orderId]);
src/robotaxi/pages/begin-route/hooks/use-order-payment.ts
@@ -1,5 +1,5 @@
import Taro from '@tarojs/taro';
import { showToast } from '../../../components/toast';
import { showToast, hideToast } from '../../../components/toast';
import { useRef } from 'react';
import { reportEvent } from '../../../../utils/Robotaxi-public-method';
import {
@@ -56,8 +56,9 @@
   * 根据订单详情状态决定结束行程后的页面态。
   */
  const resolvePostEndOrderTripStatus = async (targetOrderId: string) => {
    Taro.showLoading({
    showToast({
      title: '订单明细查询中',
      icon: 'loading',
      mask: true
    });
    try {
@@ -79,7 +80,7 @@
        nextTripStatus: TripStatus.TripFinished
      };
    } finally {
      Taro.hideLoading();
      hideToast();
    }
  };
@@ -199,8 +200,9 @@
      return;
    }
    paySubmittingRef.current = true;
    Taro.showLoading({
    showToast({
      title: '支付中',
      icon: 'loading',
      mask: false
    });
    try {
@@ -214,7 +216,7 @@
      if (paymentStatus === RobotaxiPaymentEntryStatus.Unsigned) {
        const cashierToken = paymentResult?.value?.token;
        if (!cashierToken) {
          Taro.showToast({ title: '支付凭证缺失,请稍后重试', icon: 'none' });
          showToast({ title: '支付凭证缺失,请稍后重试', icon: 'none' });
          return;
        }
        await deps.handleUnsignedPayment(cashierToken);
@@ -224,18 +226,18 @@
      if (paymentStatus === RobotaxiPaymentEntryStatus.Signed) {
        const signedPaymentValue = paymentResult?.value as SignedOrderPaymentValue;
        if (!signedPaymentValue?.packageValue) {
          Taro.showToast({ title: '支付参数缺失,请稍后重试', icon: 'none' });
          showToast({ title: '支付参数缺失,请稍后重试', icon: 'none' });
          return;
        }
        await deps.handleSignedCreditPayment(signedPaymentValue);
        return;
      }
      Taro.showToast({ title: '暂不支持当前支付方式', icon: 'none' });
      showToast({ title: '暂不支持当前支付方式', icon: 'none' });
    } catch (error) {
      showToast({ title: '支付失败,请重试', icon: 'none' });
    } finally {
      Taro.hideLoading();
      hideToast();
      paySubmittingRef.current = false;
    }
  };
src/robotaxi/pages/begin-route/hooks/use-order-submit.ts
@@ -1,5 +1,5 @@
import Taro from '@tarojs/taro';
import { showToast } from '../../../components/toast';
import { showToast, hideToast } from '../../../components/toast';
import { useCallback, useRef } from 'react';
import { formatDateTime, debounce, reportEvent } from '../../../../utils/Robotaxi-public-method';
import { createCreditPayOrder, saveOrder, routeStaleCheck, queryCreditPaySign } from '../../../api/begin-route';
@@ -141,16 +141,16 @@
   * 查询长期签约回跳后的最新支付分状态,并决定是否继续信用下单。
   */
  const resolveCreditPayModeAfterSignReturn = useCallback(async () => {
    Taro.showLoading({ title: '授权结果查询中', mask: true });
    showToast({ title: '授权结果查询中', icon: 'loading', mask: true });
    let shouldHideLoading = true;
    try {
      const signResult = await queryCreditPaySign();
      const latestStatus = signResult?.data?.status ?? signResult?.status;
      const resolvedCreditPaySubmitMode = resolveCreditPaySubmitMode(latestStatus);
      if (resolvedCreditPaySubmitMode) {
        Taro.hideLoading();
        hideToast();
        shouldHideLoading = false;
        Taro.showToast({ title: '授权成功', icon: 'none' });
        showToast({ title: '授权成功', icon: 'none' });
        return resolvedCreditPaySubmitMode;
      }
      return resolvedCreditPaySubmitMode;
@@ -158,7 +158,7 @@
      return null;
    } finally {
      if (shouldHideLoading) {
        Taro.hideLoading();
        hideToast();
      }
    }
  }, []);
@@ -499,7 +499,7 @@
      const nextCreditPaySubmitMode = await resolveCreditPayModeAfterSignReturn();
      if (!nextCreditPaySubmitMode) {
        stopCallSubmitting();
        Taro.showToast({ title: '支付分授权未完成,请重试', icon: 'none' });
        showToast({ title: '支付分授权未完成,请重试', icon: 'none' });
        return;
      }
@@ -511,7 +511,7 @@
    onLaunchFail: () => {
      waitingCreditPayReturnRef.current = false;
      stopCallSubmitting();
      Taro.showToast({ title: '拉起签约失败', icon: 'none' });
      showToast({ title: '拉起签约失败', icon: 'none' });
    }
  });
@@ -640,7 +640,7 @@
        || submitMode === 'credit_pay_skip_auth_submit';
      if (isCreditPaySubmit) {
        Taro.showLoading({ title: '加载中', mask: true });
        showToast({ title: '加载中', icon: 'loading', mask: true });
      }
      const submitResult = isCreditPaySubmit
@@ -648,7 +648,7 @@
        : await submitOrder(startSite, openCityId);
      if (!submitResult?.orderId) {
        Taro.hideLoading();
        hideToast();
        stopCallSubmitting();
        return;
      }
@@ -663,7 +663,7 @@
      if (isCreditPaySubmit) {
        Taro.setStorageSync('creditPayOrderId', submitResult.orderId);
        if (submitMode === 'credit_pay_skip_auth_submit') {
          Taro.hideLoading();
          hideToast();
          // status=2 代表当前已是免确认模式,信用下单成功后直接进入发单态。
          deps.setTripStatus(TripStatus.Publishing);
          return;
@@ -671,7 +671,7 @@
        const creditPayPackageValue = String(submitResult.creditPayPackageValue || '').trim();
        if (!creditPayPackageValue) {
          Taro.hideLoading();
          hideToast();
          showToast({ title: '支付参数缺失,请稍后重试', icon: 'none' });
          return;
        }
@@ -684,7 +684,7 @@
          packageValue: creditPayPackageValue
        }, submitResult.orderId);
        Taro.hideLoading();
        hideToast();
        // 只有拉起失败才立刻进入发单状态(或者依靠 abort 逻辑终止)
        if (!launched) {
@@ -694,10 +694,10 @@
      }
      deps.setTripStatus(TripStatus.Publishing);
    } catch (error) {
      Taro.hideLoading();
      hideToast();
      const errorMessage = String((error as any)?.msg || (error as any)?.message || '下单失败,请重试');
      if (submitMode === 'credit_pay_submit' || submitMode === 'credit_pay_skip_auth_submit') {
        Taro.showToast({ title: errorMessage, icon: 'none' });
        showToast({ title: errorMessage, icon: 'none' });
      }
      reportPayResultEvent(resolvePayResultStatus(errorMessage));
      stopCallSubmitting();
src/robotaxi/pages/begin-route/index.tsx
@@ -96,7 +96,7 @@
  resetConfirmRideSelectionContext
} from '../../constants/confirm-ride-report';
import { withRobotaxiWhitelist } from '../../../utils/whitelist';
import { showToast } from '../../components/toast';
import { showToast, hideToast } from '../../components/toast';
import type { PickupExceptionInfo } from './pickup-exception';
const MODIFY_DESTINATION_PICKUP_STATUS_GUARD_MS = 5000;
@@ -891,8 +891,9 @@
    try {
      setIsConfirmingPickupRouteChange(true);
      Taro.showLoading({
      showToast({
        title: '正在修改路线',
        icon: 'loading',
        mask: true
      });
      await selectNavigationRoute({
@@ -903,7 +904,7 @@
      setIsPickupRouteChangeVisible(false);
      pickupRouteChangeSnapshotRef.current = null;
      routeRequestOrderRoute(orderId, tripStatus);
      Taro.hideLoading();
      hideToast();
      setTimeout(() => {
        showToast({
          title: '切换成功,将按新路线行驶',
@@ -911,7 +912,7 @@
        });
      }, 0);
    } catch (error) {
      Taro.hideLoading();
      hideToast();
    } finally {
      setIsConfirmingPickupRouteChange(false);
    }
@@ -1620,7 +1621,7 @@
    }
    creditPayFallbackActiveOrderIdRef.current = '';
    if (hideLoading) {
      Taro.hideLoading();
      hideToast();
    }
  }, []);
@@ -1639,7 +1640,7 @@
    clearCreditPayFallbackRuntime(false);
    creditPayFallbackActiveOrderIdRef.current = resolvedOrderId;
    Taro.showLoading({ title: '扣款结果查询中,请勿重复支付', mask: true });
    showToast({ title: '扣款结果查询中,请勿重复支付', icon: 'loading', mask: true });
    const checkCreditPayFallback = async () => {
      try {
@@ -1648,7 +1649,7 @@
          Taro.removeStorageSync('creditPayOrderId');
          clearCreditPayFallbackRuntime();
          setCreditPayFallbackRefreshVersion((prev) => prev + 1);
          Taro.showToast({ title: '免密扣款失败,请手动支付', icon: 'none' });
          showToast({ title: '免密扣款失败,请手动支付', icon: 'none' });
        }
      } catch (error) {
      }
@@ -1710,7 +1711,7 @@
    try {
      await cancelOrder(targetOrderId);
      // Taro.showToast({
      // showToast({
      //   title: reason === 'launch_failed' ? '拉起信用分失败,已取消发单' : '未完成信用分授权,已取消发单',
      //   icon: 'none'
      // });
@@ -1727,7 +1728,7 @@
        reason,
        error
      });
      Taro.showToast({ title: '取消订单失败,请重试', icon: 'none' });
      showToast({ title: '取消订单失败,请重试', icon: 'none' });
    }
  }, [orderId, syncWaitingSignedCreditPayResult]);
src/robotaxi/pages/coupon/index.tsx
@@ -12,7 +12,7 @@
  CouponDetail
} from "../../../robotaxi/api/coupon";
import { withRobotaxiWhitelist } from "../../../utils/whitelist";
import { showToast } from "../../components/toast";
import { showToast, hideToast } from "../../components/toast";
import { withToast } from "../../components/toast/with-toast";
function CouponPage() {
@@ -126,7 +126,7 @@
  const openPopup = async (item: CouponItem) => {
    try {
      Taro.showLoading({ title: "加载中..." });
      showToast({ title: "加载中...", icon: 'loading' });
      const detail = await getCouponDetail(item.couponId);
      detail.couponDesc = decodeURIComponent(detail.couponDesc || "");
@@ -137,7 +137,7 @@
        );
      }
      setCurrentCoupon(detail);
      Taro.hideLoading();
      hideToast();
      const animation = Taro.createAnimation({
        duration: 300,
@@ -147,7 +147,7 @@
      setAnimationData(animation.export());
      setVisible(true);
    } catch (error) {
      Taro.hideLoading();
      hideToast();
      showToast({ title: "获取详情失败", icon: "none" });
    }
  };
src/robotaxi/pages/feedback/hooks/use-media-upload.ts
@@ -1,5 +1,6 @@
import Taro from '@tarojs/taro';
import { useCallback, useMemo, useState } from 'react';
import { showToast } from '../../../components/toast';
import { getStorage } from '../../../../utils/tools';
/**
@@ -162,7 +163,7 @@
        ...item,
        status: 'failed'
      }));
      Taro.showToast({
      showToast({
        title: error?.message || '上传失败,请重试',
        icon: 'none'
      });
@@ -186,7 +187,7 @@
  const chooseAndUpload = useCallback(async () => {
    const remainCount = Math.max(0, options.maxCount - items.length);
    if (remainCount <= 0) {
      Taro.showToast({
      showToast({
        title: `最多可上传${options.maxCount}个图片或视频`,
        icon: 'none'
      });
@@ -207,7 +208,7 @@
      for (const file of files) {
        const mediaType: MediaType = file.fileType === 'video' ? 'video' : 'image';
        if (mediaType === 'video' && Number(file.size || 0) > videoSizeLimitBytes) {
          Taro.showToast({
          showToast({
            title: '视频不能超过20MB',
            icon: 'none'
          });
src/robotaxi/pages/feedback/index.tsx
@@ -3,6 +3,8 @@
import { useEffect, useMemo, useRef, useState } from 'react';
import CustomNavbar from '../../../components/custom-navbar';
import { withRobotaxiWhitelist } from '../../../utils/whitelist';
import { showToast, hideToast } from '../../components/toast';
import { withToast } from '../../components/toast/with-toast';
import { getFeedbackTypeList, submitComplaint } from '../../api/feedback';
import { _ROBOTAXI_HOST } from '../../../constants/api';
import useMediaUpload from './hooks/use-media-upload';
@@ -149,7 +151,7 @@
    }
    isSubmittingRef.current = true;
    Taro.showLoading({ title: '提交中...', mask: true });
    showToast({ title: '提交中...', icon: 'loading', mask: true });
    try {
      const networkTypeRes = await Taro.getNetworkType();
      if (networkTypeRes.networkType === 'none') {
@@ -191,7 +193,7 @@
      showFeedbackToast(errorTitle);
    } finally {
      isSubmittingRef.current = false;
      Taro.hideLoading();
      hideToast();
    }
  };
@@ -447,4 +449,4 @@
  );
}
export default withRobotaxiWhitelist(FeedbackPage);
export default withRobotaxiWhitelist(withToast(FeedbackPage));
src/robotaxi/pages/payment-setting-detail/index.tsx
@@ -41,7 +41,7 @@
    try {
      const activeOrder = await getOrderActive();
      if (activeOrder) {
        Taro.showToast({
        showToast({
          title: '有进行中的订单,暂无法关闭服务',
          icon: 'none'
        });
@@ -49,7 +49,7 @@
      }
      return true;
    } catch (error) {
      Taro.showToast({
      showToast({
        title: '查询订单状态失败,请稍后重试',
        icon: 'none'
      });
src/robotaxi/pages/personal-center/index.tsx
@@ -145,7 +145,7 @@
      return;
    }
    Taro.showToast({ title: "功能建设中", icon: "none" });
    showToast({ title: "功能建设中", icon: "none" });
  };
  return (