更新特殊处理测试账号

This commit is contained in:
wyf
2025-10-17 10:46:38 +08:00
parent 5e93369dd0
commit cd7ab904ac
3 changed files with 139 additions and 102 deletions

View File

@@ -4,6 +4,7 @@ import 'package:ef/ef.dart';
import 'package:flutter/material.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/color/ServiceConstant.dart';
import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/color/app_uri_status.dart';
import 'package:vbvs_app/common/util/DailyLogUtils.dart';
import 'package:vbvs_app/common/util/FitTool.dart';
@@ -11,6 +12,8 @@ import 'package:vbvs_app/common/util/requestWithLog.dart';
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
import 'package:vbvs_app/controller/device/body_device_controller.dart';
import 'package:vbvs_app/controller/home/home_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:vbvs_app/model/BleDeviceData.dart';
import 'package:vbvs_app/model/api_response.dart';
@@ -95,9 +98,43 @@ class _SingleBlueteethDeviceCompoentWidgetState
if (response.code == HttpStatusCodes.ok) {
//更新设备绑定流程
updateDeviceBindStatus(device);
Get.toNamed("/wifiPage");
THapp bledevice = THapp(device: widget.bleDevice.device);
blueteethBindController.currentDevice = bledevice;
if (AppConstants.is_test_account) {
BlueteethBindController blueteethBindController =
Get.find();
if (blueteethBindController.returnPage == 0) {
HomeController homeController = Get.find();
BodyDeviceController deviceController = Get.find();
if (true) {
homeController.getSleepReport();
deviceController
.getDeviceNum()
.then((apiResponse) {
if (apiResponse.code != HttpStatusCodes.ok) {}
});
deviceController
.getDeviceList()
.then((apiResponse) {
if (apiResponse.code != HttpStatusCodes.ok) {
} else {
//请求睡眠报告
deviceController.getSleepReport();
}
});
}
Get.until((route) =>
Get.currentRoute == "/mianPageBottomChange");
} else {
// Get.offNamed("/bodyDevice");
// Get.offNamedUntil(page, predicate);
Get.until(
(route) => Get.currentRoute == "/bodyDevice");
}
} else {
Get.toNamed("/wifiPage");
THapp bledevice = THapp(device: widget.bleDevice.device);
blueteethBindController.currentDevice = bledevice;
}
// blueteethBindController.currentDeviceMac.value = "";
} else {
blueteethBindController.currentDeviceMac.value = "";
@@ -152,12 +189,12 @@ class _SingleBlueteethDeviceCompoentWidgetState
return SizedBox(
width: 24.rpx,
height: 24.rpx,
child:CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>(
themeController.currentColor.sc1,
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>(
themeController.currentColor.sc1,
),
),
),
);
}
return Container();
@@ -368,11 +405,11 @@ class _SingleBlueteethDeviceCompoentWidgetState
width: 24.rpx,
height: 24.rpx,
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>(
themeController.currentColor.sc1,
),
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>(
themeController.currentColor.sc1,
),
),
);
}
return Container();