新增: 壁纸切换(主题/本地图片/Bing/纯色渐变)

This commit is contained in:
2026-05-25 19:54:32 +08:00
parent a804db3579
commit bb1574641f
14 changed files with 868 additions and 395 deletions

View File

@@ -70,7 +70,7 @@ func getLocation() City {
if city := locateByIPIP(); city != nil {
return *city
}
if city := locateByQWeather(); city != nil {
if city := locateByGeoAPI(); city != nil {
return *city
}
log.Println("所有定位失败,使用默认城市:", defaultCity.Name)
@@ -104,7 +104,7 @@ func locateByIPIP() *City {
return nil
}
func locateByQWeather() *City {
func locateByGeoAPI() *City {
data, err := httpGet("https://myip.ipip.net")
if err == nil {
re := regexp.MustCompile(`(\d+\.\d+\.\d+\.\d+)`)