隐藏未实现功能

This commit is contained in:
wyf
2025-08-21 09:52:37 +08:00
parent a69209db72
commit 4fba3eb3a4
6 changed files with 83 additions and 73 deletions

View File

@@ -60,7 +60,7 @@ class WeatherModelController extends GetControllerEx<WeatherModel> {
try {
await _getCurrentLocation();
_weatherTimer = Timer.periodic(Duration(seconds: 5), (timer) {
_getCurrentWeather(); // 每 5 秒更新一次天气
getCurrentWeather(); // 每 5 秒更新一次天气
});
_locationTimer = Timer.periodic(Duration(minutes: 10), (timer) {
@@ -116,7 +116,7 @@ class WeatherModelController extends GetControllerEx<WeatherModel> {
}
// 调用获取天气方法
_getCurrentWeather();
getCurrentWeather();
} catch (e) {
print(e);
EasyDartModule.logger.error("获取位置失败: $e");
@@ -168,15 +168,15 @@ class WeatherModelController extends GetControllerEx<WeatherModel> {
}
// 获取天气信息
Future<void> _getCurrentWeather() async {
Future<void> getCurrentWeather() async {
if (model.latitude == null || model.longitude == null) {
EasyDartModule.logger.error("获取天气失败:位置数据获取失败");
return; // 如果位置数据没有获取到,则不更新天气
}
String? language = "zh_CN";
if (languageController.selectLanguage != null) {
language = languageController.selectLanguage.value!.language_code;
}
// String? language = "zh_CN";
// if (languageController.selectLanguage != null) {
// language = languageController.selectLanguage.value!.language_code;
// }
List<Placemark> placemarks = [];
// placemarks = await placemarkFromCoordinates(model.latitude!, model.longitude!,
// localeIdentifier: language);