hejianhao
2026-04-27 c551ec89d6a56f8eacde1d98867fd9ed2fcf1d01
feat(weather): 新增大雨和雨夹雪专用天气图标

- 为大雨/暴雨天气添加 rainstorm.png 图标
- 为雨夹雪天气添加 sleet.png 图标
- 更新 getWeatherIconByDesc 函数以使用新图标
2个文件已添加
1个文件已修改
6 ■■■■■ 已修改文件
src/robotaxi/assets/rainstorm.png 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/assets/sleet.png 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/weather.ts 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/assets/rainstorm.png
src/robotaxi/assets/sleet.png
src/utils/weather.ts
@@ -7,6 +7,8 @@
import thunderstormIcon from '../robotaxi/assets/thundershower.png';
import fogIcon from '../robotaxi/assets/fog.png';
import cloudyIcon from '../robotaxi/assets/cloudy.png';
import rainstormIcon from '../robotaxi/assets/rainstorm.png';
import sleetIcon from '../robotaxi/assets/sleet.png';
/**
 * 根据高德天气返回的天气描述,匹配系统定义的天气图标。
@@ -24,7 +26,7 @@
  }
  // 大雨/暴雨
  if (['大雨', '暴雨', '大暴雨', '特大暴雨', '强阵雨', '极端降雨', '中雨-大雨', '大雨-暴雨', '暴雨-大暴雨', '大暴雨-特大暴雨'].includes(weatherDesc)) {
    return rainIcon;
    return rainstormIcon;
  }
  // 小雨/中雨
  if (['阵雨', '小雨', '中雨', '毛毛雨/细雨', '雨', '小雨-中雨', '阵雨天气'].includes(weatherDesc)) {
@@ -36,7 +38,7 @@
  }
  // 雨夹雪
  if (['雨夹雪', '阵雨夹雪', '雨雪天气', '冻雨'].includes(weatherDesc)) {
    return snowIcon;
    return sleetIcon;
  }
  // 沙尘/浮尘
  if (['浮尘', '扬沙', '沙尘暴', '强沙尘暴'].includes(weatherDesc)) {