新增: 24h天气预报降水概率+组件间距统一
- 24h预报卡片显示降水概率(非0%时显示) - MULTI布局组件间距统一为20px,边距统一40px - 时间卡片和星座卡片垂直间距调整
This commit is contained in:
@@ -167,6 +167,7 @@ type hourlyItem struct {
|
||||
Time string `json:"time"`
|
||||
Temp string `json:"temp"`
|
||||
Icon string `json:"icon"`
|
||||
Pop string `json:"pop,omitempty"`
|
||||
}
|
||||
|
||||
type dailyItem struct {
|
||||
@@ -267,6 +268,7 @@ func fetchHourlyForecast(cityID string) []hourlyItem {
|
||||
Hourly []struct {
|
||||
FxTime string `json:"fxTime"`
|
||||
Temp string `json:"temp"`
|
||||
Pop string `json:"pop"`
|
||||
Text string `json:"text"`
|
||||
} `json:"hourly"`
|
||||
}
|
||||
@@ -285,7 +287,7 @@ func fetchHourlyForecast(cityID string) []hourlyItem {
|
||||
t = t[:5]
|
||||
}
|
||||
}
|
||||
result = append(result, hourlyItem{t, h.Temp + "°", getWeatherIcon(h.Text)})
|
||||
result = append(result, hourlyItem{t, h.Temp + "°", getWeatherIcon(h.Text), h.Pop})
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user