| | |
| | | import { View, Image } from "@tarojs/components"; |
| | | import './css-folder/calling-car.less' |
| | | import { formatDurationDisplay } from '../../../../utils/Robotaxi-public-method'; |
| | | import { formatRemainingDurationDisplay } from '../../../utils/format'; |
| | | |
| | | import useTripCountdown from './calling-car-modules/use-trip-countdown'; |
| | | import TripStatusHeader from './calling-car-modules/trip-status-header'; |
| | |
| | | type Props = { |
| | | /** 行程状态:3呼叫中、4即将到达、5已到达上车点、6行程中、7到达终点、8待支付、9已支付 */ |
| | | tripStatus?: number; |
| | | /** 打开取消弹窗,入参为预计到达展示文案 */ |
| | | handleOpenCancelPopup?: (durationDisplay: any) => void; |
| | | /** 打开取消弹窗,入参为顶部卡片当前展示信息 */ |
| | | handleOpenCancelPopup?: (displayInfo: { durationDisplay: { value: string | number; unit: string }; waitMinutes: number | null }) => void; |
| | | /** 上车点超时后的回调 */ |
| | | handleCancelTimeout?: () => void; |
| | | /** 到达终点后倒计时结束回调 */ |
| | |
| | | handlePay?: () => void; |
| | | /** 打开详细评价弹窗 */ |
| | | handleOpenEvaluatePopup?: () => void; |
| | | /** 首次开门后打开安全须知弹窗 */ |
| | | handleOpenAnnouncementsPopup?: () => void; |
| | | /** 预估等待分钟数 */ |
| | | estimatedWaitMinutes?: number; |
| | | /** 预估行程秒数 */ |
| | |
| | | onToggleDetailFade, |
| | | handlePay, |
| | | handleOpenEvaluatePopup, |
| | | handleOpenAnnouncementsPopup, |
| | | estimatedWaitMinutes, |
| | | routeDurationSeconds, |
| | | finishCountdownEnabled = false, |
| | |
| | | }); |
| | | |
| | | /** 预计到达时长展示(秒/分钟) */ |
| | | const durationDisplay = formatDurationDisplay(routeDurationSeconds); |
| | | const durationDisplay = formatRemainingDurationDisplay(routeDurationSeconds); |
| | | /** 车辆即将到达上车点(<=60秒) */ |
| | | const isArriveSoon = tripStatus === 4 && (typeof routeDurationSeconds === 'number' && routeDurationSeconds <= 60); |
| | | /** 上车倒计时即将结束(<60秒) */ |
| | |
| | | orderId={orderId} |
| | | orderTrunkStatus={orderTrunkStatus} |
| | | handleOpenOverRoutePopup={handleOpenOverRoutePopup} |
| | | handleOpenAnnouncementsPopup={handleOpenAnnouncementsPopup} |
| | | /> |
| | | |
| | | <FareDetailCard |
| | |
| | | orderId={orderId} |
| | | orderTrunkStatus={orderTrunkStatus} |
| | | handleOpenOverRoutePopup={handleOpenOverRoutePopup} |
| | | handleOpenAnnouncementsPopup={handleOpenAnnouncementsPopup} |
| | | /> |
| | | |
| | | <EvaluationCard |