Merge branch 'feature_v2.6.0_ui_fuqj' into feature_v2.6.0_fuqj
| | |
| | | const endSiteName = cachedEndSite?.name || cachedEndSite?.address || '-'; |
| | | |
| | | // 状态栏右侧的距离/时间文案 |
| | | const distanceText = routeDistance ? `${routeDistance.value}${routeDistance.unit === 'm' ? 'M' : 'KM'}` : ''; |
| | | const approachingTimeText = `${normalizedDurationDisplay.value}MIN`; |
| | | const inServiceTimeText = `${normalizedDurationDisplay.value}MIN`; |
| | | const distanceText = routeDistance ? `${routeDistance.value}${routeDistance.unit === 'm' ? '米' : '公里'}` : ''; |
| | | const approachingTimeText = `${normalizedDurationDisplay.value}分钟`; |
| | | const inServiceTimeText = `${normalizedDurationDisplay.value}分钟`; |
| | | |
| | | return ( |
| | | <> |
| | |
| | | import { View } from "@tarojs/components"; |
| | | import Taro from "@tarojs/taro"; |
| | | import { View, Image } from "@tarojs/components"; |
| | | import { TripStatus } from "../../../../constants/trip-status"; |
| | | |
| | | type Props = { |
| | | tripStatus?: TripStatus; |
| | | vehicleInfo?: { |
| | | vehiclePictures?: string; |
| | | vehicleCode?: string; |
| | |
| | | }; |
| | | }; |
| | | |
| | | export default function VehicleInfoCard({ vehicleInfo }: Props) { |
| | | export default function VehicleInfoCard({ tripStatus, vehicleInfo }: Props) { |
| | | // 行程中(前往目的地):车牌信息下方展示目的地图标 + 站点名称 |
| | | const showDestination = tripStatus === TripStatus.InService; |
| | | const cachedEndSite = showDestination ? (Taro.getStorageSync('endSite') || {}) : {}; |
| | | const endSiteName = cachedEndSite?.name || cachedEndSite?.address || '-'; |
| | | |
| | | // 展示车辆基础信息:左侧车牌·车身颜色,右侧车型 |
| | | return ( |
| | | <View className="car-card-detail"> |
| | | <View className="car-card-detail-plate"> |
| | | <View className="car-card-detail-num">{vehicleInfo?.plateNumber}</View> |
| | | {vehicleInfo?.vehicleColor && ( |
| | | <> |
| | | <View className="car-card-detail-dot"></View> |
| | | <View className="car-card-detail-color-text">{vehicleInfo?.vehicleColor}</View> |
| | | </> |
| | | )} |
| | | <View className="car-card-detail-wrap"> |
| | | <View className="car-card-detail"> |
| | | <View className="car-card-detail-plate"> |
| | | <View className="car-card-detail-num">{vehicleInfo?.plateNumber}</View> |
| | | {vehicleInfo?.vehicleColor && ( |
| | | <> |
| | | <View className="car-card-detail-dot"></View> |
| | | <View className="car-card-detail-color-text">{vehicleInfo?.vehicleColor}</View> |
| | | </> |
| | | )} |
| | | </View> |
| | | <View className="car-card-detail-model">小鹏GX</View> |
| | | </View> |
| | | <View className="car-card-detail-model">小鹏GX</View> |
| | | {showDestination && ( |
| | | <View className='car-card-detail-destination'> |
| | | <Image className='car-card-detail-destination-icon' src='https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/destination-icon-20260812.png' /> |
| | | <View className='car-card-detail-destination-name'>{endSiteName}</View> |
| | | </View> |
| | | )} |
| | | </View> |
| | | ); |
| | | } |
| | |
| | | } |
| | | { |
| | | [TripStatus.VehicleApproaching, TripStatus.VehicleArrivedPickup, TripStatus.InService, TripStatus.PaymentSuccess].includes(tripStatus) && |
| | | <VehicleInfoCard vehicleInfo={vehicleInfo} /> |
| | | <VehicleInfoCard tripStatus={tripStatus} vehicleInfo={vehicleInfo} /> |
| | | } |
| | | <TripStatusHeader |
| | | orderId={orderId} |
| | |
| | | .fare-box-card { |
| | | padding-bottom: 0; |
| | | } |
| | | .car-card-detail-wrap { |
| | | margin-bottom: 32px; |
| | | } |
| | | .car-card-detail { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 32px; |
| | | } |
| | | .car-card-detail-destination { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-top: 12px; |
| | | .car-card-detail-destination-icon { |
| | | width: 28px; |
| | | height: 28px; |
| | | flex-shrink: 0; |
| | | } |
| | | .car-card-detail-destination-name { |
| | | margin-left: 8px; |
| | | font-size: 24px; |
| | | color: @black-text-main; |
| | | max-width: 620px; |
| | | word-break: break-all; |
| | | } |
| | | } |
| | | .car-card-detail-plate { |
| | | display: flex; |
| | |
| | | .route-select-content-item { |
| | | flex: 1; |
| | | padding: 16px 0 24px 24px; |
| | | border-radius: 16px; |
| | | background: #F5F6FA; |
| | | border: 1px solid #F2F3F7; |
| | | border-radius: 20px; |
| | | background: @gary-theme; |
| | | |
| | | |
| | | .route-select-content-item-title { |
| | | font-size: 20px; |
| | |
| | | } |
| | | |
| | | .active-item { |
| | | background: linear-gradient(97deg, rgba(255, 209, 129, 0.2) 0%, rgba(223, 179, 105, 0.2) 103%) !important; |
| | | box-sizing: border-box; |
| | | background: rgba(223, 179, 105, 0.2); |
| | | position: relative; |
| | | |
| | | .route-select-content-item-title { |
| | | color: @gold-text; |
| | | } |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | border-radius: 16px; |
| | | padding: 1px; |
| | | background: linear-gradient(180deg, @gold-light -10%, rgba(223, 179, 105, 0.0469) 108%, rgba(0, 0, 0, 0) 108%); |
| | | -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); |
| | | -webkit-mask-composite: xor; |
| | | mask-composite: exclude; |
| | | pointer-events: none; |
| | | } |
| | | } |
| | | } |
| | |
| | | .route-select-content-item { |
| | | flex: 1; |
| | | padding: 16px 0 24px 24px; |
| | | border-radius: 16px; |
| | | border-radius: 20px; |
| | | background: #F5F6FA; |
| | | border: 1px solid #F2F3F7; |
| | | |
| | | .route-select-content-item-title { |
| | | font-size: 20px; |
| | | line-height: 20px; |
| | | color: rgba(0, 0, 0, 0.9); |
| | | color: @black-text-main; |
| | | } |
| | | |
| | | .route-select-content-item-time { |
| | |
| | | font-size: 28px; |
| | | font-weight: 500; |
| | | line-height: 40px; |
| | | color: rgba(0, 0, 0, 0.9); |
| | | color: @black-text-main; |
| | | } |
| | | |
| | | .route-select-content-item-distance { |
| | |
| | | } |
| | | |
| | | .active-item { |
| | | background: linear-gradient(97deg, rgba(255, 209, 129, 0.2) 0%, rgba(223, 179, 105, 0.2) 103%) !important; |
| | | background: rgba(223, 179, 105, 0.2); |
| | | box-sizing: border-box; |
| | | position: relative; |
| | | .route-select-content-item-title { |
| | | color: @gold-text; |
| | | } |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | border-radius: 16px; |
| | | padding: 1px; |
| | | background: linear-gradient(180deg, @gold-light -10%, rgba(223, 179, 105, 0.0469) 108%, rgba(0, 0, 0, 0) 108%); |
| | | -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); |
| | | -webkit-mask-composite: xor; |
| | | mask-composite: exclude; |
| | | pointer-events: none; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | .service-route-select-content-item { |
| | | flex: 1; |
| | | padding: 24px 24px 28px 24px; |
| | | border-radius: 16px; |
| | | background: #FFFFFF; |
| | | padding: 16px 24px 30px 24px; |
| | | border-radius: 20px; |
| | | background: #F5F6FA; |
| | | |
| | | .service-route-select-content-item-title { |
| | | font-size: 20px; |
| | |
| | | } |
| | | |
| | | .active { |
| | | background: rgba(223, 179, 105, 0.2); |
| | | background: rgba(223, 179, 105, 0.2); |
| | | box-sizing: border-box; |
| | | position: relative; |
| | | |
| | |
| | | .popup-content { |
| | | position: relative; |
| | | z-index: 103; |
| | | background: #FFFFFF; |
| | | background: @gary-theme; |
| | | border-radius: 40px 40px 0 0; |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | transform: translateY(100%); |
| | | min-height: 672px; |
| | | } |
| | | |
| | | .popup-header { |
| | |
| | | font-size: 32px; |
| | | font-weight: 500; |
| | | line-height: 32px; |
| | | color: rgba(0, 0, 0, 0.9); |
| | | color: @black-text-main; |
| | | } |
| | | |
| | | .close-icon { |
| | |
| | | "https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/change-site-up.png"; // 行程中修改目的地时的上车点图标 |
| | | // 接驾态(前往上车点)上车点三角图标 |
| | | const PICKUP_APPROACHING_ICON_URL = |
| | | "https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/up-triangle-20260722.png"; |
| | | "https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/up-triangle-20260812.png"; |
| | | // 送驾态(前往目的地)下车点三角图标 |
| | | const DROPOFF_INSERVICE_ICON_URL = |
| | | "https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/down-triangle-20260722.png"; |
| | |
| | | !shouldUseChangePickupIcon; |
| | | // 修改目的地预览:起点(上车点)统一用三角图标 up-triangle + 名称显示在图标下方 |
| | | const isPickupModifyPreview = deps.isModifyDestinationReviewVisible; |
| | | // 发布路线态:上车点同样展示三角图标 |
| | | const isPickupPublishRoute = |
| | | deps.tripStatus === TripStatus.PublishRoute && !shouldUseChangePickupIcon; |
| | | // 接驾态路线切换卡片展示中:地图状态被切换为 PublishRoute 展示态,但上车点名称仍需按三角图标态展示 |
| | | const isPickupTriangle = isPickupApproaching || isPickupArrived || isPickupSettled || isPickupModifyPreview || deps.showTrip1StyleEndpoint; |
| | | const isPickupTriangle = isPickupApproaching || isPickupArrived || isPickupSettled || isPickupModifyPreview || isPickupPublishRoute || deps.showTrip1StyleEndpoint; |
| | | // 名称在图标下方:接驾态 11px,到达/待支付/完成态 22px |
| | | const pickupNameLabelConfig = isPickupApproaching |
| | | ? SITE_NAME_LABEL_BASE |
| | |
| | | : dropoffSite.name || "目的地"; |
| | | // 送驾态(前往目的地):下车点改用三角图标,名称移到图标下方,浮窗展示 end-site 图片; |
| | | // 待支付/完成态:下车点同样三角图标 + end-site 浮窗,名称移到图标左侧。 |
| | | // 发布路线态:下车点同样展示三角图标。 |
| | | const isDropoffInService = deps.tripStatus === TripStatus.InService; |
| | | const isDropoffSettled = [ |
| | | TripStatus.TripFinished, |
| | | TripStatus.PaymentSuccess |
| | | ].includes(deps.tripStatus); |
| | | const isDropoffTriangle = isDropoffInService || isDropoffSettled; |
| | | const isDropoffPublishRoute = deps.tripStatus === TripStatus.PublishRoute; |
| | | const isDropoffTriangle = isDropoffInService || isDropoffSettled || isDropoffPublishRoute; |
| | | const useDropoffRichCallout = isDropoffTriangle; // cover-view 富浮窗 |
| | | const getCustomCalloutAnchorY = () => { |
| | | if (!deps.isAndroid && isDropoffSettled) { |
| | |
| | | {routeDistance?.value ?? 0} |
| | | </View> |
| | | <View style={{ flexShrink: 0 }}> |
| | | {isPickup |
| | | ? routeDistance?.unit === "m" ? "M" : "KM" |
| | | : routeDistance?.unit === "m" ? "米" : "公里"} |
| | | {routeDistance?.unit === "m" ? "米" : "公里"} |
| | | </View> |
| | | {!isPickup && ( |
| | | <> |
| | |
| | | src="https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/golden-car-icon-20260708.png" |
| | | /> |
| | | <CoverView className="site-status-time"> |
| | | 限停{deps.startSite?.time}MIN |
| | | 限停{deps.startSite?.time}分钟 |
| | | </CoverView> |
| | | </CoverView> |
| | | <CoverImage |
| | |
| | | !item.hideNameCallout && ( |
| | | <CoverImage |
| | | className="site-status-end-img" |
| | | src="https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/end-site-20260722.png" |
| | | src="https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/end-site-20260812.png" |
| | | /> |
| | | )} |
| | | {item.name === "车辆位置" && |
| | |
| | | {deps.routeDistance?.value ?? 0} |
| | | </CoverView> |
| | | <CoverView className="car-before-order-tip-unit"> |
| | | {deps.routeDistance?.unit === "m" ? "M" : "KM"} |
| | | {deps.routeDistance?.unit === "m" ? "米" : "公里"} |
| | | </CoverView> |
| | | <CoverView className="car-before-order-tip-value"> |
| | | {vehicleMetricDurationDisplay.value} |
| | |
| | | {deps.routeDistance?.value ?? 0} |
| | | </CoverView> |
| | | <CoverView> |
| | | {deps.routeDistance?.unit === "m" ? "M" : "KM"} |
| | | {deps.routeDistance?.unit === "m" ? "米" : "公里"} |
| | | </CoverView> |
| | | </CoverView> |
| | | ) |
| | |
| | | import CreditPayPopup from './components/credit-pay-popup'; |
| | | import CouponSelectPopup from '../../components/coupon-select-popup'; |
| | | // 调试面板:模拟完整行程流转(仅 dev 构建可见) |
| | | // import DebugOrderSimulatorPanel from './components/debug-order-simulator-panel'; |
| | | import DebugOrderSimulatorPanel from './components/debug-order-simulator-panel'; |
| | | // 弹窗状态管理 |
| | | import usePopupManager from './hooks/use-popup-manager'; |
| | | // WebSocket 事件编排 |
| | |
| | | onClose={handleCloseCreditPayPopup} |
| | | onConfirm={handleConfirmCreditPayPopup} |
| | | /> |
| | | {/* 模拟器入口已关闭,如需本地调试可取消下方注释 |
| | | |
| | | <DebugOrderSimulatorPanel |
| | | orderId={orderId} |
| | | setOrderId={setOrderId} |
| | |
| | | setShowModifyDestinationFailPopup={setShowModifyDestinationFailPopup} |
| | | setModifyDestinationFailMessage={setModifyDestinationFailMessage} |
| | | /> |
| | | */} |
| | | |
| | | </> |
| | | ) |
| | | } |
| | |
| | | id: 1, |
| | | longitude: displayStartPoint.longitude, |
| | | latitude: displayStartPoint.latitude, |
| | | width: 34, |
| | | height: 46, |
| | | width: 36, |
| | | height: 56, |
| | | anchor: { x: 0.7, y: 0.8 }, |
| | | iconPath: 'https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/start-site-order-20260804-v2.png', |
| | | iconPath: 'https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/start-site-order-20260812.png', |
| | | viewportLongitude: startPoint?.longitude, |
| | | viewportLatitude: startPoint?.latitude, |
| | | } : null, |
| | |
| | | id: 2, |
| | | longitude: endPoint.longitude, |
| | | latitude: endPoint.latitude, |
| | | width: 34, |
| | | height: 46, |
| | | width: 36, |
| | | height: 56, |
| | | anchor: { x: 0.7, y: 0.8 }, |
| | | iconPath: 'https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/end-site-order-20260804-v2.png', |
| | | iconPath: 'https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/end-site-order-20260812.png', |
| | | } : null |
| | | ].filter(Boolean) as any[]; |
| | | setMarkers(markerList); |
| | |
| | | |
| | | // 接驾态(前往上车点)/到达终点态 上车点三角图标(与 begin-route 对齐) |
| | | const PICKUP_APPROACHING_ICON_URL = |
| | | 'https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/up-triangle-20260722.png'; |
| | | 'https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/up-triangle-20260812.png'; |
| | | // 送驾态(前往目的地)/到达终点态 下车点三角图标(与 begin-route 对齐) |
| | | const DROPOFF_INSERVICE_ICON_URL = |
| | | 'https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/down-triangle-20260722.png'; |
| | |
| | | <View className='car-time' style={{ alignItems: 'baseline', paddingBottom: 0 }}> |
| | | <View className='car-time-num'>{routeDistance?.value ?? 0}</View> |
| | | <View style={{ flexShrink: 0 }}> |
| | | {isPickup |
| | | ? (routeDistance?.unit === 'm' ? 'M' : 'KM') |
| | | : (routeDistance?.unit === 'm' ? '米' : '公里')} |
| | | {routeDistance?.unit === 'm' ? '米' : '公里'} |
| | | </View> |
| | | {!isPickup && ( |
| | | <> |
| | |
| | | > |
| | | <CoverView className='car-time'> |
| | | <CoverView className='car-time-num'>{deps.routeDistance?.value ?? 0}</CoverView> |
| | | <CoverView>{deps.routeDistance?.unit === 'm' ? 'M' : 'KM'}</CoverView> |
| | | <CoverView>{deps.routeDistance?.unit === 'm' ? '米' : '公里'}</CoverView> |
| | | </CoverView> |
| | | </CoverView> |
| | | )} |
| | |
| | | className='site-status-car-icon' |
| | | src='https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/golden-car-icon-20260708.png' |
| | | /> |
| | | <CoverView className='site-status-time'>限停{deps.startSite?.time}MIN</CoverView> |
| | | <CoverView className='site-status-time'>限停{deps.startSite?.time}分钟</CoverView> |
| | | </CoverView> |
| | | <CoverImage |
| | | className='callout-diamond-icon' |
| | |
| | | {(item.id === 2 && [TripStatus.InService, TripStatus.ArrivedDestination, TripStatus.TripFinished, TripStatus.CancelOnlyPickup].includes(deps.tripStatus) && !item.hideNameCallout) && ( |
| | | <CoverImage |
| | | className='site-status-end-img' |
| | | src='https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/end-site-20260722.png' |
| | | src='https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/v2/end-site-20260812.png' |
| | | /> |
| | | )} |
| | | </> |