路线地图/节点卡片/详情按出行方式显示不同图标(批 19)

出行方式(飞机/火车/游船/自驾/地铁…)原本在路线地图标记、节点卡片交通行、
节点详情「出行方式」行一律显示节点类型图标(赶路节点恒为 🚗),易让人误解。

- TravelModeController 新增 MODE_ICONS(mode_type → emoji 映射)
- ActivityController::show() 两路查询 LEFT JOIN travel_modes 取 mode_type,注入 modeIcons
- 路线地图标记 / 卡片交通行 / 详情出行方式行:优先用出行方式图标,
  未选出行方式时回退节点类型图标
This commit is contained in:
2026-09-24 20:08:17 +08:00
parent 28fb9f6112
commit 02f40b6d6f
6 changed files with 52 additions and 5 deletions
+19
View File
@@ -22,6 +22,25 @@ class TravelModeController
'other' => '其他',
];
/**
* 出行方式 → 地图/卡片上的图标(emoji)。
* 自驾两类仍用 🚗(本来就是开车);其余按交通工具区分,
* 避免路线地图上「一律汽车」让人误解(批 19)。未列入的 mode_type 回退到节点类型图标。
*/
public const MODE_ICONS = [
'drive_own' => '🚗',
'drive_rental' => '🚙',
'train' => '🚄',
'plane' => '✈️',
'bus' => '🚌',
'subway' => '🚇',
'taxi' => '🚕',
'bike' => '🚲',
'walk' => '🚶',
'ship' => '🚢',
'other' => '🔀',
];
public function index(): void
{
$this->requireLogin();