Merge branch 'fix/select-collect-no-name-show' into 'feature_v2.0'
fix(site-search): 修复收藏夹选场站name不显示的问题
See merge request robotaxi1/xp-robotaxi-miniprogram!110
| | |
| | | /** |
| | | * 收藏站点返回的是“收藏记录对象”,这里统一转换成下单链路使用的站点对象。 |
| | | */ |
| | | const normalizeFavoriteSelectedSite = (item: any) => { |
| | | const resolvedPointId = item?.pointId || ''; |
| | | const resolvedName = item?.pointName || ''; |
| | | const normalizeFavoriteSelectedSite = (item: any) => { |
| | | const resolvedPointId = item?.pointId || item?.id || ''; |
| | | const resolvedName = item?.pointName || item?.name || ''; |
| | | const shouldPreserveFavoriteId = item?.pointId && String(item?.id || '') !== String(item?.pointId || ''); |
| | | return { |
| | | ...item, |
| | |
| | | id: resolvedPointId, |
| | | pointId: resolvedPointId, |
| | | name: resolvedName, |
| | | pointName: item?.pointName || resolvedName, |
| | | pointName: resolvedName, |
| | | }; |
| | | }; |
| | | |