hejianhao
2026-06-13 e729f22e836327c4b8783b9ff89d36e32d3e5a46
chore: 升级 Taro 依赖至 3.6.40 并调整多项 UI 与代码细节

- 升级所有 @tarojs 相关依赖包至 3.6.40 版本
- 删除预估路线页面中未使用的 useEffect 钩子函数
- 注释onTap点击地图事件
- 调整运营区域地图覆盖物的填充色与线条样式
- 更新路线选择面板的默认偏好设置显示文本
- 将 RGBA 颜色格式统一转换为十六进制简写格式
8个文件已修改
44574 ■■■■■ 已修改文件
package-lock.json 44527 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/begin-route-view.tsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/route-selection-panel.tsx 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/hooks/use-route-interaction.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/index.tsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/operating-area/index.tsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/select-map-site/hooks/use-select-map-site.ts 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package-lock.json
Diff too large
package.json
@@ -28,13 +28,13 @@
  "dependencies": {
    "@babel/runtime": "^7.7.7",
    "@rematch/core": "^1.1.304",
    "@tarojs/components": "3.4.9",
    "@tarojs/plugin-framework-react": "3.4.9",
    "@tarojs/components": "3.6.40",
    "@tarojs/plugin-framework-react": "3.6.40",
    "@tarojs/plugin-platform-kwai": "^2.0.0",
    "@tarojs/plugin-platform-xhs": "^1.1.0",
    "@tarojs/react": "3.4.9",
    "@tarojs/runtime": "3.4.9",
    "@tarojs/taro": "3.4.9",
    "@tarojs/react": "3.6.40",
    "@tarojs/runtime": "3.6.40",
    "@tarojs/taro": "3.6.40",
    "ahooks": "^3.7.6",
    "arrify": "^1.0.1",
    "babel-plugin-setname": "^0.1.1",
@@ -65,17 +65,17 @@
  },
  "devDependencies": {
    "@babel/core": "^7.8.0",
    "@tarojs/cli": "3.4.9",
    "@tarojs/mini-runner": "3.4.9",
    "@tarojs/cli": "3.6.40",
    "@tarojs/mini-runner": "3.6.40",
    "@tarojs/plugin-mini-ci": "^4.1.2",
    "@tarojs/webpack-runner": "3.4.9",
    "@tarojs/webpack-runner": "3.6.40",
    "@types/react": "^17.0.2",
    "@types/webpack-env": "^1.13.6",
    "@typescript-eslint/eslint-plugin": "^4.15.1",
    "@typescript-eslint/parser": "^4.15.1",
    "babel-preset-taro": "3.4.9",
    "babel-preset-taro": "3.6.40",
    "eslint": "^6.8.0",
    "eslint-config-taro": "3.4.9",
    "eslint-config-taro": "3.6.40",
    "eslint-plugin-import": "^2.12.0",
    "eslint-plugin-react": "^7.8.2",
    "eslint-plugin-react-hooks": "^4.2.0",
src/robotaxi/pages/begin-route/components/begin-route-view.tsx
@@ -40,7 +40,7 @@
      onCalloutTap={handleCalloutTap}
      onRegionChange={handleRegionChange}
      onPolylineTap={onPolylineTap}
      onTap={onMapTap}
      // onTap={onMapTap}
      style={{ width: '100%', height: '87vh' }}
    >
      {renderMapOverlays()}
src/robotaxi/pages/begin-route/components/route-selection-panel.tsx
@@ -25,7 +25,7 @@
  selectedRouteIndex = 0,
  handleSelectRoute
}: Props) {
  const DEFAULT_PREFERENCE: RoutePreferenceOption = { label: '智能推荐', value: 'default', code: 'default' }; // 路线偏好默认值,避免初始渲染空指针
  const DEFAULT_PREFERENCE: RoutePreferenceOption = { label: '', value: 'default', code: 'default' }; // 路线偏好默认值,避免初始渲染空指针
  const [showPreferencePopup, setShowPreferencePopup] = useState(false);
  const [preference, setPreference] = useState<RoutePreferenceOption>(DEFAULT_PREFERENCE);
  const [preferenceOptions, setPreferenceOptions] = useState<RoutePreferenceOption[]>([]);
@@ -120,7 +120,7 @@
      <View className='route-select-type'>
        <View className='route-select-title'>路线选择:</View>
        <View className='route-select-preference' onClick={() => setShowPreferencePopup(true)}>
          <View className='route-select-preference-text'>{preference?.label || '智能推荐'}</View>
          <View className='route-select-preference-text'>{preference?.label || ''}</View>
          <Image src="https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/select-line.png" />
        </View>
      </View>
src/robotaxi/pages/begin-route/hooks/use-route-interaction.ts
@@ -332,7 +332,7 @@
   * 处理 polyline 点击事件。
   */
  const handlePolylineTap = (event: any) => {
    console.log('[点击折现事件:',event);
    console.log('[点击折线事件:',event);
    const targetIndex = resolveRouteIndexByTap(event);
    if (targetIndex >= 0 && targetIndex < allRoutePoints.length) {
      handleSelectRoute(targetIndex, { syncSites: false });
src/robotaxi/pages/begin-route/index.tsx
@@ -1239,14 +1239,6 @@
    }
    updateMapViewportPadding();
  };
  useEffect(() => {
    if (isRouteSelectExpanded) {
      setOriginOpacity(0);
    } else {
      setOriginOpacity(1);
    }
  }, [isRouteSelectExpanded]);
  const handleModifyDestination = () => {
    isCheckedEnter.current = true;
    handleStartModifyDestination(fareEstimate, routePoints);
src/robotaxi/pages/operating-area/index.tsx
@@ -73,11 +73,12 @@
      return [];
    }
    return geofenceList.map(item => {
      const isSelected = item.mapPolygonId === selectedId;
      return {
        points: item.polygonPoints || [],
        strokeWidth: 0,
        strokeColor: 'rgba(0, 0, 0, 0)',
        fillColor: '#6d7fd933',
        fillColor: isSelected ? '#6d7fd933' : '#6d7fd91a',
        zIndex: 1,
        id: item.mapPolygonId
      }
@@ -92,11 +93,11 @@
      const isSelected = item.mapPolygonId === selectedId;
      return {
        points: item.polylinePoints || [],
        color: isSelected ? '#6D7FD9' : '#A1B1FF',
        color: '#A1B1FF',
        width: 2,
        dottedLine: !isSelected,
        arrowLine: false,
        borderColor: isSelected ? '#6D7FD9' : '#A1B1FF',
        borderColor: '#A1B1FF',
        borderWidth: 0,
        zIndex: isSelected ? 3 : 2,
        id: Number(item.mapPolygonId ?? index + 1)
src/robotaxi/pages/select-map-site/hooks/use-select-map-site.ts
@@ -45,8 +45,8 @@
const AUTO_SCALE_MAX = 17; // 自动缩放最大等级
const AUTO_SCALE_MIN = 11; // 自动缩放最小等级
const INCLUDE_POINTS_PADDING = [100, 100, 100, 100] as [number, number, number, number]; // 地图回视图内边距
const CROSS_OPERATING_AREA_FILL_COLOR = 'rgba(0, 0, 0, 0.25)'; // 非可选运营区围栏填充色
const CROSS_OPERATING_AREA_STROKE_COLOR = 'rgba(0, 0, 0, 0.4)'; // 非可选运营区围栏描边色
const CROSS_OPERATING_AREA_FILL_COLOR = '#00000040'; // 非可选运营区围栏填充色
const CROSS_OPERATING_AREA_STROKE_COLOR = '#00000066'; // 非可选运营区围栏描边色
const SELECT_MAP_POINT_ON_OFF = {
  start: 1,
  end: 2