更新版本迭代重新登录

This commit is contained in:
wyf
2025-07-25 09:25:04 +08:00
parent 617ea71fe9
commit 19568913bb
11 changed files with 256 additions and 85 deletions

View File

@@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:EasyDartModule/EasyDartModule.dart';
import 'package:ef/ef.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:vbvs_app/common/color/ServiceConstant.dart';
@@ -9,6 +10,7 @@ import 'package:vbvs_app/common/color/app_uri_status.dart';
import 'package:vbvs_app/common/util/DailyLogUtils.dart';
import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/common/util/requestWithLog.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/model/api_response.dart';
part 'mht_home_controller.g.dart'; // 由json_serializable自动生成的部分
@@ -480,7 +482,7 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
);
}
Future<void> getHomeSleeps(String? mac) async {
Future<void> getHomeSleeps(String? mac, BuildContext context) async {
String serviceAddress = ServiceConstant.service_address;
String serviceName = ServiceConstant.server_service;
String serviceApi = ServiceConstant.sleep_report;
@@ -544,6 +546,8 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
},
onFailure: (res) {
EasyDartModule.logger.warning("请求睡眠信息列表失败: ${res.msg}");
TopSlideNotification.show(context,
text: "请求失败".tr, textColor: themeController.currentColor.sc9);
},
);
}