feat(weather): 新增大雨和雨夹雪专用天气图标
- 为大雨/暴雨天气添加 rainstorm.png 图标
- 为雨夹雪天气添加 sleet.png 图标
- 更新 getWeatherIconByDesc 函数以使用新图标
| | |
| | | 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'; |
| | | |
| | | /** |
| | | * 根据高德天气返回的天气描述,匹配系统定义的天气图标。 |
| | |
| | | } |
| | | // 大雨/暴雨 |
| | | if (['大雨', '暴雨', '大暴雨', '特大暴雨', '强阵雨', '极端降雨', '中雨-大雨', '大雨-暴雨', '暴雨-大暴雨', '大暴雨-特大暴雨'].includes(weatherDesc)) { |
| | | return rainIcon; |
| | | return rainstormIcon; |
| | | } |
| | | // 小雨/中雨 |
| | | if (['阵雨', '小雨', '中雨', '毛毛雨/细雨', '雨', '小雨-中雨', '阵雨天气'].includes(weatherDesc)) { |
| | |
| | | } |
| | | // 雨夹雪 |
| | | if (['雨夹雪', '阵雨夹雪', '雨雪天气', '冻雨'].includes(weatherDesc)) { |
| | | return snowIcon; |
| | | return sleetIcon; |
| | | } |
| | | // 沙尘/浮尘 |
| | | if (['浮尘', '扬沙', '沙尘暴', '强沙尘暴'].includes(weatherDesc)) { |