| src/robotaxi/pages/select-map-site/components/select-map-site-view.tsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/robotaxi/pages/select-map-site/hooks/use-select-map-site.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/robotaxi/pages/select-map-site/index.less | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/robotaxi/pages/select-map-site/index.tsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/robotaxi/pages/select-map-site/components/select-map-site-view.tsx
@@ -49,6 +49,7 @@ handleCloseTipPopup: () => void; tipType: string; toPersonalCenter: () => void; toSiteSearch: () => void; }; /** @@ -80,6 +81,13 @@ <View onClick={deps.toBack} className="select-city"> <Image className="select-city-icon" src={deps.backIcon} /> </View> {/* 搜索框 */} <View onClick={deps.toSiteSearch} className="search-card"> <View className={`search-icon ${deps.pageType == 'end' ? 'end-icon' : ''}`}></View> <View className="search-input-box"> <View className="search-input-placeholder">{deps.pageType == 'start' ? '请输入上车点' : '请输入目的地'}</View> </View> </View> {/* 地图浮层入口 */} <View className="map-entry"> <Image onClick={deps.toPersonalCenter} className="map-entry-icon" src={deps.personalCenter} /> src/robotaxi/pages/select-map-site/hooks/use-select-map-site.ts
@@ -1,4 +1,4 @@ import Taro from "@tarojs/taro"; import Taro, { useDidShow } from "@tarojs/taro"; import { useEffect } from 'react'; import { buildStationMetaMap, @@ -719,6 +719,29 @@ return () => { cancelled = true; }; }, []); // 从 site-search 返回时同步已选择的站点 useDidShow(() => { const pType = state.router.params.pageType || state.pageType || 'end'; let cachedSite: any = null; if (pType === 'start') { cachedSite = Taro.getStorageSync('startSite'); } else if (pType === 'end') { cachedSite = Taro.getStorageSync('endSite'); } if (cachedSite && cachedSite.latitude && cachedSite.longitude) { const currentId = String(state.selectedSite?.pointId || state.selectedSite?.id || ''); const cachedId = String(cachedSite?.pointId || cachedSite?.id || ''); if (currentId !== cachedId) { state.setLatitude(cachedSite.latitude); state.setLongitude(cachedSite.longitude); applySelectionBySite(cachedSite); updateMapData(cachedSite.latitude, cachedSite.longitude).then(({ isInside }) => { state.setRangeStatus(getRangeStatus(isInside, cachedSite)); }); } } }); useSelectMapSiteWalkingRoute({ pageType: state.pageType, userLatitude: state.userLatitude, src/robotaxi/pages/select-map-site/index.less
@@ -18,6 +18,52 @@ } } .search-card { position: fixed; top: 180px; left: 31px; right: 150px; display: flex; align-items: center; border-radius: 24px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(40px); box-sizing: border-box; border: 2px solid #F1F1F1; box-shadow: 0px 16px 60px 0px rgba(0, 0, 0, 0.05); padding: 22px 36px 24px 32px; z-index: 11; .search-icon { width: 10px; height: 10px; background: #768AFF; border-radius: 50%; margin-right: 16px; flex-shrink: 0; } .end-icon { background: #8BB654; } .search-input-box { flex: 1; display: flex; align-items: center; .search-input-placeholder { flex: 1; height: 40px; font-size: 28px; font-weight: normal; line-height: 40px; color: rgba(0, 0, 0, 0.3); text-align: left; } } } .map-entry { position: fixed; top: 182px; src/robotaxi/pages/select-map-site/index.tsx
@@ -1,3 +1,4 @@ import Taro from '@tarojs/taro'; import { useEffect, useRef } from 'react'; import './index.less'; import { reportEvent } from '../../../utils/Robotaxi-public-method'; @@ -91,6 +92,19 @@ showTipPopup={selectMapSite.showTipPopup} handleCloseTipPopup={selectMapSite.handleCloseTipPopup} tipType={selectMapSite.tipType} toSiteSearch={() => { const lat = selectMapSite.latitude; const lon = selectMapSite.longitude; const electronicAreaId = selectMapSite.selectedSite?.electronicAreaId || ''; let url = '/robotaxi/pages/site-search/index?pageType=' + selectMapSite.pageType; if (lat != null && lon != null) { url += '&latitude=' + lat + '&longitude=' + lon; } if (electronicAreaId) { url += '&electronicAreaId=' + electronicAreaId; } Taro.navigateTo({ url }); }} /> ); }