fix: 修正行程状态判断、后备箱状态及UI显示问题
- 扩展Android原生标注使用条件至行程状态1、8、9
- 修正后备箱状态判断逻辑,基于openTrunk字段值
- 调整车辆标记图标尺寸(宽高互换)
- 统一费用描述页的时间显示字段
- 为关闭按钮背景添加!important样式
- 优化代码注释格式
| | |
| | | .close-btn-item { |
| | | position: relative; |
| | | border-radius: 16px; |
| | | background: linear-gradient(110deg, rgba(132, 117, 255, 0.2) 0%, rgba(125, 214, 255, 0.2) 99%); |
| | | background: linear-gradient(110deg, rgba(132, 117, 255, 0.2) 0%, rgba(125, 214, 255, 0.2) 99%) !important; |
| | | |
| | | &::after { |
| | | content: ""; |
| | |
| | | const [showTipPopup, setShowTipPopup] = useState(false); // 提示弹窗是否显示 |
| | | const [tipType, setTipType] = useState(''); // 提示类型 |
| | | const [routePoints, setRoutePoints] = useState<any[]>([]); // 路线点集合 |
| | | // 步行路径点 |
| | | const [walkingPoints, setWalkingPoints] = useState<any[]>([]); |
| | | const [walkingPoints, setWalkingPoints] = useState<any[]>([]); // 步行路径点 |
| | | const [walkingTime, setWalkingTime] = useState<number>(0); // 步行到上车点的预估时间(秒) |
| | | const carMarkerInitialized = useRef(false); // 车辆标记是否已初始化 |
| | | const [fareEstimate, setFareEstimate] = useState<any>({}); // 预估费用信息 |
| | |
| | | useEffect(() => { |
| | | const pickupSite = startSite?.latitude && startSite?.longitude ? startSite : Taro.getStorageSync('startSite'); |
| | | const dropoffSite = endSite?.latitude && endSite?.longitude ? endSite : Taro.getStorageSync('endSite'); |
| | | const useAndroidNativeTrip1Callout = isAndroid && tripStatus === 1; |
| | | const useAndroidNativeTrip1Callout = isAndroid && [1, 8, 9].includes(tripStatus); |
| | | const pickupMarker = pickupSite?.latitude && pickupSite?.longitude ? { |
| | | id: 1, |
| | | latitude: pickupSite.latitude, |
| | |
| | | ...(useAndroidNativeTrip1Callout |
| | | ? { |
| | | callout: { |
| | | content: `${pickupSite?.name || '上车点'} >`, |
| | | content: tripStatus === 1 ? `${pickupSite?.name || '上车点'} >` : (pickupSite?.name || '上车点'), |
| | | color: '#000000', |
| | | fontSize: 12, |
| | | bgColor: '#FFFFFF', |
| | |
| | | ...(useAndroidNativeTrip1Callout |
| | | ? { |
| | | callout: { |
| | | content: `${[7].includes(tripStatus) ? '已到达' : (dropoffSite.name || '目的地')} >`, |
| | | content: tripStatus === 1 ? `${[7].includes(tripStatus) ? '已到达' : (dropoffSite.name || '目的地')} >` : ([7].includes(tripStatus) ? '已到达' : (dropoffSite.name || '目的地')), |
| | | color: '#000000', |
| | | fontSize: 12, |
| | | bgColor: '#FFFFFF', |
| | |
| | | latitude: vehicleLocation.latitude, |
| | | longitude: vehicleLocation.longitude, |
| | | iconPath: 'https://huishou-1323682843.cos.ap-nanjing.myqcloud.com/images/e8c34535-f297-43da-8ab9-97f55939c0ae.png', |
| | | width: 40, |
| | | height: 20, |
| | | width: 20, |
| | | height: 40, |
| | | anchor: { x: 0.5, y: 0.5 }, |
| | | zIndex: 2, |
| | | rotate: typeof vehicleDirection === 'number' ? vehicleDirection : 0, |
| | |
| | | if (!res) { |
| | | return; |
| | | } |
| | | setTrunkStatus(res.trunkStatus == 2 ? false : true); |
| | | setTrunkStatus([0, 2].includes(res.openTrunk) ? false : true); |
| | | const nextStartSite = { |
| | | id: res.startPointId || '', |
| | | name: res.startPointName || '', |
| | |
| | | > |
| | | {/* 自定义callout */} |
| | | { |
| | | !(isAndroid && tripStatus === 1) && markers.map((item, index) => { |
| | | !(isAndroid && [1, 8, 9].includes(tripStatus)) && markers.map((item, index) => { |
| | | const calloutKey = `callout-${item.id}-${item.name || ''}`; |
| | | const isWaiting = [2, 3].includes(tripStatus) && index === 0; |
| | | |
| | |
| | | {fareData.start?.map((item, index) => ( |
| | | <View className='flex-between-card mb-16' key={index}> |
| | | <View className='price-notice-label'> |
| | | {item.startTime}-{item.endTime} |
| | | {item.time} |
| | | { |
| | | (item.mileage > 0 && item.duration > 0) && |
| | | <Text>({formatTripDistance(item.mileage)},{formatTripDurationFromSeconds(item.duration)})</Text> |