ai-coding
2026-06-13 00794ab63503b331a62ea88899a2e6bca86ea7f5
feat(select-map-site): 优化目的地选择流程视图顶部UI

Co-Authored-By: '廖芳' <liaof@xiaopeng.com>
2个文件已修改
20 ■■■■■ 已修改文件
src/robotaxi/pages/select-map-site/components/select-map-site-view.tsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/select-map-site/index.less 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/select-map-site/components/select-map-site-view.tsx
@@ -1,4 +1,6 @@
import { View, Map, Text, Image, ScrollView } from '@tarojs/components';
import { useMemo } from 'react';
import Taro from '@tarojs/taro';
import CustomerServicePopup from '../../../components/customer-service';
import TipPopup from '../../../components/tip-popup';
import { formatTripDistance, formatTripDurationFromSeconds } from '../../../../utils/Robotaxi-public-method';
@@ -67,6 +69,17 @@
  const shouldShowSelectedSiteEcho = !showRangeWarning && Boolean(deps.selectedSite.name);
  const shouldShowStationSelection = deps.selectionMode === 'station' && !showRangeWarning;
  // 搜索框右侧与小程序胶囊按钮右边缘对齐
  const searchCardRightPx = useMemo(() => {
    try {
      const menuButton = Taro.getMenuButtonBoundingClientRect();
      const systemInfo = Taro.getSystemInfoSync();
      return systemInfo.screenWidth - menuButton.right;
    } catch {
      return 7; // fallback
    }
  }, []);
  return (
    <View className="home-container">
      <Map
@@ -83,11 +96,11 @@
        style={{ width: '100%', height: '100%' }}
      >
        {/* 返回 */}
        <View onClick={deps.toBack} className="select-city">
        <View onClick={deps.toBack} className="select-city" style={{ left: `${searchCardRightPx}px` }}>
          <Image className="select-city-icon" src={deps.backIcon} />
        </View>
        {/* 搜索框 */}
        <View onClick={deps.toSiteSearch} className="search-card">
        <View onClick={deps.toSiteSearch} className="search-card" style={{ left: `${searchCardRightPx}px`, right: `${searchCardRightPx}px` }}>
          <View className={`search-icon ${deps.pageType == 'end' ? 'end-icon' : ''}`}></View>
          <View className="search-input-box">
            <View className="search-input-placeholder">{deps.pageType == 'start' ? '请输入上车点' : '请输入目的地'}</View>
src/robotaxi/pages/select-map-site/index.less
@@ -1,7 +1,6 @@
.select-city {
    position: fixed;
    top: 92px;
    left: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
@@ -21,8 +20,6 @@
.search-card {
    position: fixed;
    top: 180px;
    left: 31px;
    right: 31px;
    display: flex;
    align-items: center;
    border-radius: 24px;