更新微信登录bug

This commit is contained in:
wyf
2025-08-25 15:43:17 +08:00
parent 8f601d498f
commit 558bec0dd6
9 changed files with 140 additions and 15 deletions

View File

@@ -60,13 +60,13 @@ class WeatherModelController extends GetControllerEx<WeatherModel> {
super.onInit();
try {
await _getCurrentLocation();
await getCurrentLocation();
_weatherTimer = Timer.periodic(Duration(minutes: 10), (timer) {
getCurrentWeather(); // 每 60 秒更新一次天气
});
_locationTimer = Timer.periodic(Duration(minutes: 10), (timer) {
_getCurrentLocation(); // 每 10 分钟更新一次位置
getCurrentLocation(); // 每 10 分钟更新一次位置
});
} catch (e) {
ef.log("[天气和定位请求失败]");
@@ -81,7 +81,7 @@ class WeatherModelController extends GetControllerEx<WeatherModel> {
}
// 获取当前位置并存储到 model
Future<void> _getCurrentLocation() async {
Future<void> getCurrentLocation() async {
try {
UserInfoController userInfoController = Get.find();
if (userInfoController.model.login == null ||