更新
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
class CommonVariables {
|
||||
static bool isNetWorkOn = false;
|
||||
|
||||
|
||||
// 企业微信客服拉起的url地址
|
||||
static String wxKfUrl = "https://work.weixin.qq.com/kfid/kfcab6a07e8aac68945";
|
||||
// 企业微信ID
|
||||
@@ -14,4 +13,7 @@ class CommonVariables {
|
||||
static String ICPTime = "2022-2025";
|
||||
|
||||
static Map<String, Function(dynamic)> callMap = {};
|
||||
|
||||
static const String weather_apiKey =
|
||||
'40e23445cf0a29561af2b5b7d506a38b'; // 替换为你的 API 密钥
|
||||
}
|
||||
|
||||
@@ -160,12 +160,6 @@ class GlobalController extends GetControllerEx<GlobalModel> {
|
||||
return "$mac".toUpperCase();
|
||||
}
|
||||
|
||||
getDeviceType() async {
|
||||
var rs =
|
||||
await ef.from("app_device_type").select().order("id", ascending: true);
|
||||
model.deviceType = rs.where((d) => d["page"] != null).toList();
|
||||
updateAll();
|
||||
}
|
||||
|
||||
getDeviceList({int time = 1}) async {
|
||||
await EasyDartModule.dio.get("/api/device/info/list").then((d) {
|
||||
|
||||
@@ -38,19 +38,7 @@ class PersonController extends GetControllerEx<PersonModel> {
|
||||
attr = GetModel(PersonModel()).obs;
|
||||
}
|
||||
RxList selectedDiseaseIds = [].obs;
|
||||
// RxList diseaseList = [
|
||||
// {'id': 1, 'name': '高血压'},
|
||||
// {'id': 2, 'name': '糖尿病'},
|
||||
// {'id': 3, 'name': '冠心病'},
|
||||
// {'id': 4, 'name': '哮喘'},
|
||||
// {'id': 5, 'name': '脑卒中'},
|
||||
// {'id': 6, 'name': '慢性肾病'},
|
||||
// {'id': 7, 'name': '慢阻肺'},
|
||||
// {'id': 8, 'name': '类风湿关节炎'},
|
||||
// {'id': 9, 'name': '类风湿关节炎类风湿关节炎'},
|
||||
// {'id': 10, 'name': '类风湿关节炎类风湿关节炎类风湿关节炎'},
|
||||
// ].obs;
|
||||
|
||||
|
||||
RxString currentPersonId = "".obs;
|
||||
RxString name = "".obs;
|
||||
RxInt gender = 1.obs;
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
class PdfController extends GetxController {
|
||||
var localPdfPath = Rx<String?>(null);
|
||||
|
||||
// 加载 PDF 文件
|
||||
Future<void> loadPdf() async {
|
||||
final byteData = await rootBundle.load('assets/img/test.pdf');
|
||||
final tempDir = await getTemporaryDirectory();
|
||||
|
||||
// 使用 path 包拼接路径
|
||||
final filePath = p.join(tempDir.path, 'test.pdf');
|
||||
final file = File(filePath);
|
||||
|
||||
// 保存文件到临时目录
|
||||
await file.writeAsBytes(byteData.buffer.asUint8List());
|
||||
localPdfPath.value = filePath; // 更新 PDF 路径
|
||||
}
|
||||
}
|
||||
@@ -31,10 +31,12 @@ import 'package:vbvs_app/controller/message/message_controller.dart';
|
||||
import 'package:vbvs_app/controller/person/person_controller.dart';
|
||||
import 'package:vbvs_app/controller/repair/repair_controller.dart';
|
||||
import 'package:vbvs_app/controller/setting/language/language_controller.dart';
|
||||
import 'package:vbvs_app/controller/setting/pdf/PdfController.dart';
|
||||
import 'package:vbvs_app/controller/setting/pdf/PrivacyPdfController.dart';
|
||||
import 'package:vbvs_app/controller/setting/pdf/UserPdfController.dart';
|
||||
import 'package:vbvs_app/controller/sleep/sleep_report_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
import 'package:vbvs_app/controller/time/countdown_controller.dart';
|
||||
import 'package:vbvs_app/controller/weather/weather_controller.dart';
|
||||
import 'package:vbvs_app/language/AppLanguage.dart';
|
||||
import 'package:vbvs_app/model/CustomThemeColor.dart';
|
||||
import 'package:vbvs_app/model/user_data.dart';
|
||||
@@ -60,6 +62,8 @@ Future<void> main() async {
|
||||
await initLogin();
|
||||
await initLog();
|
||||
await messageStatus();
|
||||
|
||||
|
||||
startMessagePolling();
|
||||
// 检查网络
|
||||
Checknetwork.checkNetwork();
|
||||
@@ -225,6 +229,7 @@ class MyApp extends StatelessWidget {
|
||||
initialBinding: BindingsBuilder(() => [
|
||||
// Get.lazyPut(() => UserInfoController()),
|
||||
Get.put(GlobalController()),
|
||||
Get.put(WeatherModelController()),
|
||||
Get.lazyPut(() => MainPageController()),
|
||||
Get.lazyPut(() => BlueteethBindController()),
|
||||
Get.lazyPut(() => PersonController()),
|
||||
@@ -237,7 +242,8 @@ class MyApp extends StatelessWidget {
|
||||
Get.lazyPut(() => DeviceShareListController()),
|
||||
Get.lazyPut(() => DeviceCalibrationController()),
|
||||
Get.lazyPut(() => RepairController()),
|
||||
Get.lazyPut(() => PdfController()),
|
||||
Get.lazyPut(() => UserPdfController()),
|
||||
Get.lazyPut(() => PrivacyPdfController()),
|
||||
Get.lazyPut(() => CalendarController()),
|
||||
Get.lazyPut(() => SleepReportController()),
|
||||
]));
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/base/SleepCalendarWidget.dart';
|
||||
import 'package:vbvs_app/controller/device/device_calibration_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
import 'package:vbvs_app/enum/CalendarType.dart';
|
||||
|
||||
getOnePicker(context, List arr, int checkIndex, Function onSelectedItemChanged,
|
||||
{bool looping = false}) {
|
||||
@@ -881,9 +880,13 @@ void showProgressDialog(
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: progress *
|
||||
// width: progress *
|
||||
// MediaQuery.of(context).size.width *
|
||||
// 0.4,
|
||||
width: progress /
|
||||
100 *
|
||||
MediaQuery.of(context).size.width *
|
||||
0.8,
|
||||
0.8, // 进度条宽度按比例计算,最大宽度是屏幕宽度的 0.8
|
||||
height: 21.rpx,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
|
||||
@@ -13,6 +13,7 @@ import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.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/pages/device/component/DeviceDataComponentWidget.dart';
|
||||
|
||||
@@ -26,6 +27,7 @@ class BodyDeviceWidget extends StatefulWidget {
|
||||
class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
final ThemeController themeController = Get.find();
|
||||
final BodyDeviceController bodyDeviceController = Get.find();
|
||||
HomeController homeController = Get.find();
|
||||
final GlobalKey addIconKey = GlobalKey();
|
||||
OverlayEntry? _popupEntry;
|
||||
Timer? _timer;
|
||||
@@ -300,9 +302,15 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
onTap: () async {
|
||||
bodyDeviceController.model.type =
|
||||
1;
|
||||
homeController.model.type = 1;
|
||||
await bodyDeviceController
|
||||
.getDeviceList();
|
||||
await bodyDeviceController
|
||||
.getDeviceList();
|
||||
await bodyDeviceController
|
||||
.getSleepReport();
|
||||
bodyDeviceController.updateAll();
|
||||
homeController.updateAll();
|
||||
},
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
@@ -348,11 +356,17 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
borderRadius: 8.rpx,
|
||||
padding: EdgeInsets.all(0),
|
||||
onTap: () async {
|
||||
homeController.model.type = 2;
|
||||
bodyDeviceController.model.type =
|
||||
2;
|
||||
await bodyDeviceController
|
||||
.getDeviceList();
|
||||
await bodyDeviceController
|
||||
.getDeviceList();
|
||||
await bodyDeviceController
|
||||
.getSleepReport();
|
||||
bodyDeviceController.updateAll();
|
||||
homeController.updateAll();
|
||||
},
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
@@ -536,8 +550,8 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
),
|
||||
cursorColor: themeController
|
||||
.currentColor.sc3,
|
||||
cursorColor: themeController
|
||||
.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -601,7 +615,6 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Obx(() {
|
||||
final isEmpty =
|
||||
bodyDeviceController.deviceList.value.isEmpty;
|
||||
|
||||
@@ -299,7 +299,7 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
_popupEntry?.remove();
|
||||
_popupEntry = null;
|
||||
BlueteethBindController blueteethBindController = Get.find();
|
||||
blueteethBindController.currentDeviceMac = widget.device['mac'];
|
||||
blueteethBindController.currentDeviceMac?.value = widget.device['mac'];
|
||||
Get.toNamed("/calibrationPage", arguments: 2);
|
||||
},
|
||||
),
|
||||
@@ -745,7 +745,7 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'张三',
|
||||
'uusne12',
|
||||
style:
|
||||
FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Inter',
|
||||
@@ -1030,6 +1030,8 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
widget.device['person']['gender'] ?? 1;
|
||||
personController.weight.value =
|
||||
widget.device['person']['weight'] ?? 0;
|
||||
personController.height.value =
|
||||
widget.device['person']['height'] ?? 0;
|
||||
personController.selectedDiseaseIds.value =
|
||||
widget.device['person']['disease'] ?? [];
|
||||
personController.birthday.value =
|
||||
|
||||
@@ -90,7 +90,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
borderRadius: 20.rpx,
|
||||
onTap: () async {
|
||||
// Get.toNamed("/personPage");
|
||||
Get.toNamed("/bindDeviceSuccess");
|
||||
Get.toNamed("/bindDeviceSuccess");
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
@@ -490,110 +490,6 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
child: CustomCard(
|
||||
borderRadius:
|
||||
AppConstants().button_container_radius, // 圆角半径
|
||||
// onTap: () async {
|
||||
// BlueteethBindController blueteethBindController =
|
||||
// Get.find();
|
||||
// String serviceAddress = "http://192.168.1.80:8086";
|
||||
// String serviceApi = ServiceConstant.start_calibration;
|
||||
// String queryUrl = "${serviceAddress}${serviceApi}";
|
||||
// requestWithLog(
|
||||
// logTitle: "设备校准",
|
||||
// method: MyHttpMethod.post,
|
||||
// queryUrl: queryUrl,
|
||||
// data: {
|
||||
// "macA": blueteethBindController.currentDeviceMac,
|
||||
// if (blueteethBindController.cid!.value.isNotEmpty)
|
||||
// "id": blueteethBindController.cid!.value,
|
||||
// },
|
||||
// onSuccess: (res) {
|
||||
// String cid = res.rawResponse.data['cid'];
|
||||
// blueteethBindController.cid!.value = cid;
|
||||
// final ValueNotifier<double> progressNotifier =
|
||||
// ValueNotifier<double>(0.0);
|
||||
// final ValueNotifier<bool> failureNotifier =
|
||||
// ValueNotifier<bool>(false);
|
||||
// Timer? pollingTimer;
|
||||
// // 定义请求函数
|
||||
// void requestCalibrationProgress() {
|
||||
// String serviceAddress =
|
||||
// "http://192.168.1.80:8086";
|
||||
// String serviceApi =
|
||||
// ServiceConstant.calibration_process;
|
||||
// String queryUrl =
|
||||
// "${serviceAddress}${serviceApi}?id=$cid";
|
||||
// requestWithLog(
|
||||
// logTitle: "设备校准进度",
|
||||
// method: MyHttpMethod.get,
|
||||
// queryUrl: queryUrl,
|
||||
// onSuccess: (res) {
|
||||
// print(res);
|
||||
// deviceCalibrationController.tips.value =
|
||||
// res.data['statusText'];
|
||||
// if (res.data['per'] == 100) {
|
||||
// TopSlideNotification.show(context,
|
||||
// text: deviceCalibrationController
|
||||
// .tips.value);
|
||||
// }
|
||||
// double process =
|
||||
// (res.data['per'] ?? 0).toDouble();
|
||||
// progressNotifier.value = process;
|
||||
// if (process >= 100) {
|
||||
// if (deviceCalibrationController
|
||||
// .process.value ==
|
||||
// 0) {
|
||||
// deviceCalibrationController
|
||||
// .bed_calibration.value = 1;
|
||||
// deviceCalibrationController.updateAll();
|
||||
// }
|
||||
// if (deviceCalibrationController
|
||||
// .process.value ==
|
||||
// 1) {
|
||||
// deviceCalibrationController
|
||||
// .position_calibration.value = 1;
|
||||
// deviceCalibrationController.updateAll();
|
||||
// }
|
||||
// deviceCalibrationController
|
||||
// .process.value = 1;
|
||||
// deviceCalibrationController.updateAll();
|
||||
// pollingTimer?.cancel();
|
||||
// }
|
||||
// },
|
||||
// onFailure: (res) {
|
||||
// pollingTimer?.cancel();
|
||||
// failureNotifier.value = true;
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: res.msg ?? "服务器.失败".tr,
|
||||
// textColor:
|
||||
// themeController.currentColor.sc9,
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
|
||||
// // 启动轮询
|
||||
// pollingTimer =
|
||||
// Timer.periodic(Duration(seconds: 2), (timer) {
|
||||
// requestCalibrationProgress();
|
||||
// });
|
||||
|
||||
// // 初始调用一次
|
||||
// requestCalibrationProgress();
|
||||
|
||||
// // 显示进度弹窗
|
||||
// showProgressDialog(
|
||||
// context, progressNotifier, failureNotifier);
|
||||
// },
|
||||
// onFailure: (res) {
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: res.msg ?? "服务器.失败".tr,
|
||||
// textColor: themeController.currentColor.sc9,
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
// },
|
||||
|
||||
onTap: () async {
|
||||
if (deviceCalibrationController.complete) {
|
||||
showConfirmDialog(
|
||||
@@ -608,139 +504,279 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
.position_calibration.value = 0;
|
||||
blueteethBindController.cid!.value = "";
|
||||
deviceCalibrationController.complete = false;
|
||||
}, onCancel: () {});
|
||||
}
|
||||
|
||||
String serviceAddress =
|
||||
"https://caibration.he-info.cn";
|
||||
String calibrationApi =
|
||||
ServiceConstant.start_calibration;
|
||||
String progressApi =
|
||||
ServiceConstant.calibration_process;
|
||||
|
||||
BlueteethBindController blueteethBindController =
|
||||
Get.find();
|
||||
String serviceAddress = "https://caibration.he-info.cn/";
|
||||
String calibrationApi =
|
||||
ServiceConstant.start_calibration;
|
||||
String progressApi =
|
||||
ServiceConstant.calibration_process;
|
||||
String queryUrl =
|
||||
"$serviceAddress$calibrationApi";
|
||||
|
||||
String queryUrl = "$serviceAddress$calibrationApi";
|
||||
final ValueNotifier<double> progressNotifier =
|
||||
ValueNotifier<double>(0.0);
|
||||
final ValueNotifier<bool> failureNotifier =
|
||||
ValueNotifier<bool>(false);
|
||||
Timer? pollingTimer;
|
||||
|
||||
final ValueNotifier<double> progressNotifier =
|
||||
ValueNotifier<double>(0.0);
|
||||
final ValueNotifier<bool> failureNotifier =
|
||||
ValueNotifier<bool>(false);
|
||||
Timer? pollingTimer;
|
||||
Map<String, dynamic> data = {
|
||||
"macA": blueteethBindController
|
||||
.currentDeviceMac!.value,
|
||||
};
|
||||
|
||||
Map<String, dynamic> data = {
|
||||
"macA": blueteethBindController.currentDeviceMac,
|
||||
};
|
||||
|
||||
// 是否是二次点击(有cid表示进行第二阶段)
|
||||
bool isSecondStep =
|
||||
blueteethBindController.cid?.value.isNotEmpty ??
|
||||
// 是否是二次点击(有cid表示进行第二阶段)
|
||||
bool isSecondStep = blueteethBindController
|
||||
.cid?.value.isNotEmpty ??
|
||||
false;
|
||||
|
||||
if (isSecondStep) {
|
||||
data["id"] = blueteethBindController.cid!.value;
|
||||
}
|
||||
|
||||
// 发起校准请求
|
||||
requestWithLog(
|
||||
logTitle: "设备校准",
|
||||
method: MyHttpMethod.post,
|
||||
queryUrl: queryUrl,
|
||||
data: data,
|
||||
onSuccess: (res) {
|
||||
if (!isSecondStep) {
|
||||
// 保存第一次获取的 cid
|
||||
String cid = res.rawResponse.data['cid'];
|
||||
blueteethBindController.cid!.value = cid;
|
||||
if (isSecondStep) {
|
||||
data["id"] = blueteethBindController.cid!.value;
|
||||
}
|
||||
|
||||
void requestCalibrationProgress() {
|
||||
String cid = blueteethBindController.cid!.value;
|
||||
String progressUrl =
|
||||
"$serviceAddress$progressApi?id=$cid";
|
||||
requestWithLog(
|
||||
logTitle: "设备校准进度",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl: progressUrl,
|
||||
onSuccess: (res) {
|
||||
final data = res.data;
|
||||
double per = (data['per'] ?? 0).toDouble();
|
||||
int currStep = data['currStep'] ?? -1;
|
||||
bool status = data['status'] ?? false;
|
||||
String tips = data['statusText'] ?? '';
|
||||
// 发起校准请求
|
||||
requestWithLog(
|
||||
logTitle: "设备校准",
|
||||
method: MyHttpMethod.post,
|
||||
queryUrl: queryUrl,
|
||||
data: data,
|
||||
onSuccess: (res) {
|
||||
if (!isSecondStep) {
|
||||
// 保存第一次获取的 cid
|
||||
String cid = res.rawResponse.data['cid'];
|
||||
blueteethBindController.cid!.value = cid;
|
||||
}
|
||||
|
||||
deviceCalibrationController.tips.value =
|
||||
tips;
|
||||
// progressNotifier.value =
|
||||
// (res.data['per'] ?? 0) / 100.0;
|
||||
progressNotifier.value = per;
|
||||
void requestCalibrationProgress() {
|
||||
String cid =
|
||||
blueteethBindController.cid!.value;
|
||||
String progressUrl =
|
||||
"$serviceAddress$progressApi?id=$cid";
|
||||
requestWithLog(
|
||||
logTitle: "设备校准进度",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl: progressUrl,
|
||||
onSuccess: (res) {
|
||||
final data = res.data;
|
||||
double per =
|
||||
(data['per'] ?? 0).toDouble();
|
||||
int currStep = data['currStep'] ?? -1;
|
||||
bool status = data['status'] ?? false;
|
||||
String tips = data['statusText'] ?? '';
|
||||
|
||||
if (!isSecondStep && per >= 100) {
|
||||
// 第一步完成:仅 per >= 100
|
||||
pollingTimer?.cancel();
|
||||
TopSlideNotification.show(context,
|
||||
text: tips);
|
||||
deviceCalibrationController
|
||||
.process.value = 1;
|
||||
deviceCalibrationController
|
||||
.bed_calibration.value = 1;
|
||||
deviceCalibrationController.tips.value =
|
||||
tips;
|
||||
|
||||
deviceCalibrationController.updateAll();
|
||||
}
|
||||
progressNotifier.value = per;
|
||||
if (!isSecondStep && per >= 20) {
|
||||
progressNotifier.value = 100;
|
||||
// 第一步完成:仅 per >= 100
|
||||
pollingTimer?.cancel();
|
||||
TopSlideNotification.show(context,
|
||||
text: tips);
|
||||
deviceCalibrationController
|
||||
.process.value = 1;
|
||||
deviceCalibrationController
|
||||
.bed_calibration.value = 1;
|
||||
|
||||
if (isSecondStep &&
|
||||
per >= 100 &&
|
||||
currStep == 5 &&
|
||||
status == true) {
|
||||
// 第二步完成:per >= 100 && currStep == 5 && status == true
|
||||
pollingTimer?.cancel();
|
||||
TopSlideNotification.show(context,
|
||||
text: "设备校准完成".tr);
|
||||
// 可在这里执行校准完成后的业务逻辑更新
|
||||
deviceCalibrationController
|
||||
.bed_calibration.value = 1;
|
||||
deviceCalibrationController
|
||||
.position_calibration.value = 1;
|
||||
deviceCalibrationController
|
||||
.process.value = 1;
|
||||
deviceCalibrationController.complete =
|
||||
true;
|
||||
deviceCalibrationController.updateAll();
|
||||
}
|
||||
},
|
||||
onFailure: (res) {
|
||||
pollingTimer?.cancel();
|
||||
failureNotifier.value = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
deviceCalibrationController
|
||||
.updateAll();
|
||||
}
|
||||
|
||||
if (isSecondStep &&
|
||||
per >= 100 &&
|
||||
currStep == 5 &&
|
||||
status == true) {
|
||||
// 第二步完成:per >= 100 && currStep == 5 && status == true
|
||||
pollingTimer?.cancel();
|
||||
TopSlideNotification.show(context,
|
||||
text: "设备校准完成".tr);
|
||||
// 可在这里执行校准完成后的业务逻辑更新
|
||||
deviceCalibrationController
|
||||
.bed_calibration.value = 1;
|
||||
deviceCalibrationController
|
||||
.position_calibration.value = 1;
|
||||
deviceCalibrationController
|
||||
.process.value = 1;
|
||||
deviceCalibrationController.complete =
|
||||
true;
|
||||
deviceCalibrationController
|
||||
.updateAll();
|
||||
}
|
||||
},
|
||||
onFailure: (res) {
|
||||
pollingTimer?.cancel();
|
||||
failureNotifier.value = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// 初始调用一次
|
||||
requestCalibrationProgress();
|
||||
// 初始调用一次
|
||||
requestCalibrationProgress();
|
||||
|
||||
// 开始轮询
|
||||
pollingTimer =
|
||||
Timer.periodic(Duration(seconds: 2), (_) {
|
||||
requestCalibrationProgress();
|
||||
});
|
||||
// 开始轮询
|
||||
pollingTimer =
|
||||
Timer.periodic(Duration(seconds: 2), (_) {
|
||||
requestCalibrationProgress();
|
||||
});
|
||||
|
||||
// 显示进度弹窗
|
||||
showProgressDialog(
|
||||
context, progressNotifier, failureNotifier);
|
||||
},
|
||||
onFailure: (res) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
// 显示进度弹窗
|
||||
showProgressDialog(context, progressNotifier,
|
||||
failureNotifier);
|
||||
},
|
||||
onFailure: (res) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}, onCancel: () {
|
||||
return;
|
||||
});
|
||||
} else {
|
||||
BlueteethBindController blueteethBindController =
|
||||
Get.find();
|
||||
String serviceAddress =
|
||||
"https://caibration.he-info.cn";
|
||||
String calibrationApi =
|
||||
ServiceConstant.start_calibration;
|
||||
String progressApi =
|
||||
ServiceConstant.calibration_process;
|
||||
|
||||
String queryUrl = "$serviceAddress$calibrationApi";
|
||||
|
||||
final ValueNotifier<double> progressNotifier =
|
||||
ValueNotifier<double>(0.0);
|
||||
final ValueNotifier<bool> failureNotifier =
|
||||
ValueNotifier<bool>(false);
|
||||
Timer? pollingTimer;
|
||||
|
||||
Map<String, dynamic> data = {
|
||||
"macA": blueteethBindController
|
||||
.currentDeviceMac!.value,
|
||||
};
|
||||
|
||||
// 是否是二次点击(有cid表示进行第二阶段)
|
||||
bool isSecondStep =
|
||||
blueteethBindController.cid?.value.isNotEmpty ??
|
||||
false;
|
||||
|
||||
if (isSecondStep) {
|
||||
data["id"] = blueteethBindController.cid!.value;
|
||||
}
|
||||
|
||||
// 发起校准请求
|
||||
requestWithLog(
|
||||
logTitle: "设备校准",
|
||||
method: MyHttpMethod.post,
|
||||
queryUrl: queryUrl,
|
||||
data: data,
|
||||
onSuccess: (res) {
|
||||
if (!isSecondStep) {
|
||||
// 保存第一次获取的 cid
|
||||
String cid = res.rawResponse.data['cid'];
|
||||
blueteethBindController.cid!.value = cid;
|
||||
}
|
||||
|
||||
void requestCalibrationProgress() {
|
||||
String cid =
|
||||
blueteethBindController.cid!.value;
|
||||
String progressUrl =
|
||||
"$serviceAddress$progressApi?id=$cid";
|
||||
requestWithLog(
|
||||
logTitle: "设备校准进度",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl: progressUrl,
|
||||
onSuccess: (res) {
|
||||
final data = res.data;
|
||||
double per =
|
||||
(data['per'] ?? 0).toDouble();
|
||||
int currStep = data['currStep'] ?? -1;
|
||||
bool status = data['status'] ?? false;
|
||||
String tips = data['statusText'] ?? '';
|
||||
|
||||
deviceCalibrationController.tips.value =
|
||||
tips;
|
||||
|
||||
progressNotifier.value = per;
|
||||
if (!isSecondStep && per >= 20) {
|
||||
progressNotifier.value = 100;
|
||||
// 第一步完成:仅 per >= 100
|
||||
pollingTimer?.cancel();
|
||||
TopSlideNotification.show(context,
|
||||
text: tips);
|
||||
deviceCalibrationController
|
||||
.process.value = 1;
|
||||
deviceCalibrationController
|
||||
.bed_calibration.value = 1;
|
||||
|
||||
deviceCalibrationController.updateAll();
|
||||
}
|
||||
|
||||
if (isSecondStep &&
|
||||
per >= 100 &&
|
||||
currStep == 5 &&
|
||||
status == true) {
|
||||
// 第二步完成:per >= 100 && currStep == 5 && status == true
|
||||
pollingTimer?.cancel();
|
||||
TopSlideNotification.show(context,
|
||||
text: "设备校准完成".tr);
|
||||
// 可在这里执行校准完成后的业务逻辑更新
|
||||
deviceCalibrationController
|
||||
.bed_calibration.value = 1;
|
||||
deviceCalibrationController
|
||||
.position_calibration.value = 1;
|
||||
deviceCalibrationController
|
||||
.process.value = 1;
|
||||
deviceCalibrationController.complete =
|
||||
true;
|
||||
deviceCalibrationController.updateAll();
|
||||
}
|
||||
},
|
||||
onFailure: (res) {
|
||||
pollingTimer?.cancel();
|
||||
failureNotifier.value = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// 初始调用一次
|
||||
requestCalibrationProgress();
|
||||
|
||||
// 开始轮询
|
||||
pollingTimer =
|
||||
Timer.periodic(Duration(seconds: 2), (_) {
|
||||
requestCalibrationProgress();
|
||||
});
|
||||
|
||||
// 显示进度弹窗
|
||||
showProgressDialog(
|
||||
context, progressNotifier, failureNotifier);
|
||||
},
|
||||
onFailure: (res) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
colors: [
|
||||
|
||||
@@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/WebViewWidget.dart';
|
||||
import 'package:vbvs_app/controller/setting/pdf/PdfController.dart';
|
||||
|
||||
class HelpPage extends StatefulWidget {
|
||||
late MyWebView webView;
|
||||
@@ -14,7 +13,7 @@ class HelpPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _HelpPageState extends State<HelpPage> {
|
||||
PdfController pdfController = Get.find();
|
||||
// PdfController pdfController = Get.find();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -78,36 +77,7 @@ class _HelpPageState extends State<HelpPage> {
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
|
||||
// body: SafeArea(
|
||||
// top: true,
|
||||
// child: Padding(
|
||||
// padding: EdgeInsets.symmetric(horizontal: 30.rpx),
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: Obx(() {
|
||||
// if (pdfController.localPdfPath.value == null) {
|
||||
// return Center(child: CircularProgressIndicator());
|
||||
// } else {
|
||||
// return PDFView(
|
||||
// filePath: pdfController.localPdfPath.value!,
|
||||
// autoSpacing: false,
|
||||
// enableSwipe: true,
|
||||
// swipeHorizontal: false,
|
||||
// pageSnap: true,
|
||||
// fitEachPage: true,
|
||||
// defaultPage: 0,
|
||||
// onRender: (pages) => print('PDF 渲染完成,共 $pages 页'),
|
||||
// onError: (error) => print('PDF 加载错误: $error'),
|
||||
// );
|
||||
// }
|
||||
// }),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Padding(
|
||||
|
||||
@@ -18,6 +18,7 @@ import 'package:vbvs_app/controller/home/home_controller.dart';
|
||||
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/weather/weather_controller.dart';
|
||||
import 'package:vbvs_app/enum/LoginStatus.dart';
|
||||
|
||||
class HomePage extends StatefulWidget {
|
||||
@@ -33,6 +34,7 @@ class _HomePageState extends State<HomePage> {
|
||||
ThemeController themeController = Get.find();
|
||||
BodyDeviceController deviceController = Get.find();
|
||||
HomeController homeController = Get.find();
|
||||
WeatherModelController weatherModelController = Get.find();
|
||||
|
||||
final GlobalKey addIconKey = GlobalKey();
|
||||
OverlayEntry? _popupEntry;
|
||||
@@ -301,15 +303,18 @@ class _HomePageState extends State<HomePage> {
|
||||
.normal_text_fontSize,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"嘉兴 晴",
|
||||
style: TextStyle(
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize,
|
||||
),
|
||||
),
|
||||
Obx(() {
|
||||
return Text(
|
||||
"嘉兴 " +
|
||||
"${weatherModelController.model.weather_info ?? '未知数据'.tr}",
|
||||
style: TextStyle(
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize,
|
||||
),
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -362,11 +367,11 @@ class _HomePageState extends State<HomePage> {
|
||||
backgroundColor: Colors.transparent, // 容器背景色
|
||||
highlightColor: themeController
|
||||
.currentColor.sc21, // 点击时的背景色
|
||||
onTap: () {
|
||||
onTap: () async {
|
||||
print('点击了容器');
|
||||
if (userInfoController.model.login ==
|
||||
LoginStatus.LOGIN.code) {
|
||||
Get.toNamed("/bodyDevice");
|
||||
await Get.toNamed("/bodyDevice");
|
||||
} else {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
|
||||
@@ -693,7 +693,7 @@ class _MinePageState extends State<MinePage> {
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
'V1.0.2504.12',
|
||||
'V1.0.2505.20',
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
|
||||
class SleepReportPage extends StatefulWidget {
|
||||
const SleepReportPage({super.key});
|
||||
|
||||
@override
|
||||
State<SleepReportPage> createState() => _SleepReportPageState();
|
||||
}
|
||||
|
||||
class _SleepReportPageState extends State<SleepReportPage> {
|
||||
GlobalController globalController = Get.find();
|
||||
UserInfoController userInfoController = Get.find();
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, boxConstraints) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
child: Scaffold(
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Text("睡眠报告"),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -108,6 +108,7 @@ class _UpdatePageState extends State<UpdatePersonPage> {
|
||||
if (apiRespons.code == HttpStatusCodes.ok) {
|
||||
TopSlideNotification.show(context,
|
||||
text: apiRespons.msg!);
|
||||
|
||||
} else {
|
||||
TopSlideNotification.show(context,
|
||||
text: apiRespons.msg!,
|
||||
@@ -268,79 +269,7 @@ class _UpdatePageState extends State<UpdatePersonPage> {
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
// Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Container(
|
||||
// width: 90.rpx,
|
||||
// height: 90.rpx,
|
||||
// decoration: BoxDecoration(),
|
||||
// child: Container(
|
||||
// clipBehavior: Clip.antiAlias,
|
||||
// decoration: BoxDecoration(
|
||||
// shape: BoxShape.circle,
|
||||
// ),
|
||||
// child: ColorFiltered(
|
||||
// colorFilter: ColorFilter.mode(
|
||||
// Colors.grey.withOpacity(
|
||||
// 0.6), // 这里控制灰色度的强度
|
||||
// BlendMode.saturation, // 将图像变成灰度
|
||||
// ),
|
||||
// child: Image.asset(
|
||||
// "assets/img/man.png",
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Text(
|
||||
// '男'.tr,
|
||||
// style: FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// ),
|
||||
// ),
|
||||
// ].divide(SizedBox(height: 14.rpx)),
|
||||
// ),
|
||||
// Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Container(
|
||||
// width: 90.rpx,
|
||||
// height: 90.rpx,
|
||||
// decoration: BoxDecoration(),
|
||||
// child: Container(
|
||||
// clipBehavior: Clip.antiAlias,
|
||||
// decoration: BoxDecoration(
|
||||
// shape: BoxShape.circle,
|
||||
// ),
|
||||
// child: Image.asset(
|
||||
// "assets/img/woman.png",
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Text(
|
||||
// '女'.tr,
|
||||
// style: FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// ),
|
||||
// ),
|
||||
// ].divide(SizedBox(height: 14.rpx)),
|
||||
// ),
|
||||
|
||||
children: [
|
||||
Obx(
|
||||
() {
|
||||
bool isMaleGreyed =
|
||||
|
||||
@@ -1,36 +1,34 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
|
||||
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
// import 'package:easydevice/easydevice.dart';
|
||||
|
||||
import 'package:vbvs_app/component/tool/WebViewWidget.dart';
|
||||
|
||||
class AboutUsPage extends StatefulWidget {
|
||||
const AboutUsPage({super.key});
|
||||
late MyWebView webView;
|
||||
AboutUsPage({super.key});
|
||||
|
||||
@override
|
||||
State<AboutUsPage> createState() => _AboutUsPageState();
|
||||
}
|
||||
|
||||
class _AboutUsPageState extends State<AboutUsPage> {
|
||||
GlobalController globalController = Get.find();
|
||||
UserInfoController userInfoController = Get.find();
|
||||
BlueteethBindController blueteethBindController = Get.find();
|
||||
ThemeController themeController = Get.find();
|
||||
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// pdfController.loadPdf();
|
||||
widget.webView = MyWebView(
|
||||
url: "https://mp.weixin.qq.com/s/IAr4RNBy0hGJXGKyMxe7eQ",
|
||||
onLoad: () {
|
||||
print('网页载入完毕');
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
@@ -45,10 +43,9 @@ class _AboutUsPageState extends State<AboutUsPage> {
|
||||
backgroundColor: Colors.transparent, // 加上这一行
|
||||
appBar: AppBar(
|
||||
backgroundColor: themeController.currentColor.sc17,
|
||||
// backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
iconTheme: IconThemeData(color: themeController.currentColor.sc3),
|
||||
titleSpacing: 0,
|
||||
// leading: returnIconButtom,
|
||||
title: Container(
|
||||
@@ -59,7 +56,7 @@ class _AboutUsPageState extends State<AboutUsPage> {
|
||||
children: [
|
||||
/// 居中标题
|
||||
Text(
|
||||
'关于我们.标题'.tr,
|
||||
'关于我们'.tr,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: themeController.currentColor.sc3,
|
||||
@@ -80,336 +77,47 @@ class _AboutUsPageState extends State<AboutUsPage> {
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
|
||||
// body: SafeArea(
|
||||
// top: true,
|
||||
// child: Padding(
|
||||
// padding: EdgeInsets.symmetric(horizontal: 30.rpx),
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: Obx(() {
|
||||
// if (pdfController.localPdfPath.value == null) {
|
||||
// return Center(child: CircularProgressIndicator());
|
||||
// } else {
|
||||
// return PDFView(
|
||||
// filePath: pdfController.localPdfPath.value!,
|
||||
// autoSpacing: false,
|
||||
// enableSwipe: true,
|
||||
// swipeHorizontal: false,
|
||||
// pageSnap: true,
|
||||
// fitEachPage: true,
|
||||
// defaultPage: 0,
|
||||
// onRender: (pages) => print('PDF 渲染完成,共 $pages 页'),
|
||||
// onError: (error) => print('PDF 加载错误: $error'),
|
||||
// );
|
||||
// }
|
||||
// }),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(30.rpx, 0, 30.rpx, 0),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
// Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 30.rpx, 25.rpx, 30.rpx, 0),
|
||||
// child: Container(
|
||||
// width: double.infinity,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Color(0xFF242835),
|
||||
// borderRadius: BorderRadius.circular(
|
||||
// AppConstants().normal_container_radius),
|
||||
// ),
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0.rpx, 0, 0.rpx, 0),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// ClickableContainer(
|
||||
// backgroundColor: Colors.transparent, // 容器背景色
|
||||
// highlightColor: themeController
|
||||
// .currentColor.sc21, // 点击时的背景色
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||||
// onTap: () {
|
||||
// print('点击了容器');
|
||||
// },
|
||||
// child: Container(
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0.rpx, 20.rpx, 0.rpx, 20.rpx),
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Text(
|
||||
// '设置页.主题模式'.tr,
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// fontSize: AppConstants()
|
||||
// .title_text_fontSize,
|
||||
// letterSpacing: 0.0,
|
||||
// ),
|
||||
// ),
|
||||
// ].divide(SizedBox(width: 22.rpx)),
|
||||
// ),
|
||||
// Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Text(
|
||||
// '深色',
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// color:
|
||||
// Color(0xFFD9E3EB),
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// ),
|
||||
// ),
|
||||
// SvgPicture.asset(
|
||||
// 'assets/img/icon/arrow_right.svg',
|
||||
// width: 8.rpx,
|
||||
// height: 15
|
||||
// .rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// ),
|
||||
// ].divide(SizedBox(width: 28.rpx)),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ClickableContainer(
|
||||
// backgroundColor: Colors.transparent, // 容器背景色
|
||||
// highlightColor: themeController
|
||||
// .currentColor.sc21, // 点击时的背景色
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||||
// onTap: () {
|
||||
// print('点击了容器');
|
||||
// },
|
||||
// child: Container(
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0.rpx, 20.rpx, 0.rpx, 20.rpx),
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Text(
|
||||
// '设置页.选择语言'.tr,
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// fontSize: AppConstants()
|
||||
// .title_text_fontSize,
|
||||
// letterSpacing: 0.0,
|
||||
// ),
|
||||
// ),
|
||||
// ].divide(SizedBox(width: 22.rpx)),
|
||||
// ),
|
||||
// Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Text(
|
||||
// '中文',
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// color:
|
||||
// Color(0xFFD9E3EB),
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// ),
|
||||
// ),
|
||||
// SvgPicture.asset(
|
||||
// 'assets/img/icon/arrow_right.svg',
|
||||
// width: 8.rpx,
|
||||
// height: 15
|
||||
// .rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// ),
|
||||
// ].divide(SizedBox(width: 28.rpx)),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ClickableContainer(
|
||||
// backgroundColor: Colors.transparent, // 容器背景色
|
||||
// highlightColor: themeController
|
||||
// .currentColor.sc21, // 点击时的背景色
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
// onTap: () {
|
||||
// print('点击了容器');
|
||||
// },
|
||||
// child: Container(
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 40.rpx, 20.rpx, 40.rpx, 20.rpx),
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Text(
|
||||
// '设置页.关于我们'.tr,
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// fontSize: AppConstants()
|
||||
// .title_text_fontSize,
|
||||
// letterSpacing: 0.0,
|
||||
// ),
|
||||
// ),
|
||||
// ].divide(SizedBox(width: 22.rpx)),
|
||||
// ),
|
||||
// SvgPicture.asset(
|
||||
// 'assets/img/icon/arrow_right.svg',
|
||||
// width: 8.rpx,
|
||||
// height:
|
||||
// 14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ClickableContainer(
|
||||
// backgroundColor: Colors.transparent, // 容器背景色
|
||||
// highlightColor: themeController
|
||||
// .currentColor.sc21, // 点击时的背景色
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||||
// onTap: () {
|
||||
// print('点击了容器');
|
||||
// },
|
||||
// child: Container(
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0.rpx, 20.rpx, 0.rpx, 20.rpx),
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Text(
|
||||
// '设置页.用户协议'.tr,
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// fontSize: AppConstants()
|
||||
// .title_text_fontSize,
|
||||
// letterSpacing: 0.0,
|
||||
// ),
|
||||
// ),
|
||||
// ].divide(SizedBox(width: 22.rpx)),
|
||||
// ),
|
||||
// SvgPicture.asset(
|
||||
// 'assets/img/icon/arrow_right.svg',
|
||||
// width: 8.rpx,
|
||||
// height:
|
||||
// 15.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ClickableContainer(
|
||||
// backgroundColor: Colors.transparent, // 容器背景色
|
||||
// highlightColor: themeController
|
||||
// .currentColor.sc21, // 点击时的背景色
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
// onTap: () {
|
||||
// print('点击了容器');
|
||||
// },
|
||||
// child: Container(
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 40.rpx, 20.rpx, 40.rpx, 20.rpx),
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Text(
|
||||
// '设置页.隐私协议'.tr,
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// fontSize: AppConstants()
|
||||
// .title_text_fontSize,
|
||||
// letterSpacing: 0.0,
|
||||
// ),
|
||||
// ),
|
||||
// ].divide(SizedBox(width: 22.rpx)),
|
||||
// ),
|
||||
// SvgPicture.asset(
|
||||
// 'assets/img/icon/arrow_right.svg',
|
||||
// width: 8.rpx,
|
||||
// height:
|
||||
// 14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ]
|
||||
// .divide(SizedBox(height: 0.rpx))
|
||||
// .addToStart(SizedBox(height: 30.rpx))
|
||||
// .addToEnd(SizedBox(height: 30.rpx)),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
SizedBox(
|
||||
height: 30.rpx,
|
||||
),
|
||||
Text(
|
||||
"企业简介\n\n\n嘉兴太和信息技术有限公司成立于2013年,是一家以传感技术、室内定位技术和人工智能技术为基础的国家高新技术企业,AI非接触生命体征传感器、高精度室内外一体定位平台、AI视频分析系统、射频消融等技术成果,目前已经拥有30多类知识产权证书,多项专利技术处于行业领先水平。\n\n\n我司研发的“非接触式生命体征传感器”是一款基于BCG信号原理,通过检测人体心脏搏动引起的微小振动的传感器系统。传感器系统通过将人体微弱的心跳、呼吸信号转换未电信号,进行相关生命体征分析。该传感器可为用户提供高灵敏度和精确度检测结构,适用于需要非接触式、高分辨率的监测场景。该系统的硬件、软件及生产维护均由我司自主开发和管理,拥有完全自主知识产权,并已申请多项国家专利,可依据用户需求定制个性化方案。\n\n\n该产品置于床垫下方使用,全程完全无感。采集的体征数据通过睡眠健康管理平台实时显示用户的健康状态,并对每次的睡眠报告进行系统化归档管理,支持长期查询。一旦用户在使用过程中出现异常情况,系统可及时做出判断并反馈预警信息和建议。目前,心率监测的准确度可达97%以上,呼吸监测的准确度可达95%以上,其他生理指标的监测精度也显著优于同类产品。该产品主体材质均采用符合国家标准的环保材料,部分硅胶配件达到食品级安全标准。产品尺寸可根据需求进行定制,适用于单人床、双人床、婴儿床、椅子及枕头等多种场景。\n\n\n睡眠健康管理平台通过实时预警与远程管理,提升睡眠质量及慢病干预效率,助力养老院、月子中心、康复中心、智能寝具等行业降本增效,实现精准健康的科学管理。",
|
||||
style: TextStyle(
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
color: themeController.currentColor.sc3),
|
||||
),
|
||||
],
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.rpx),
|
||||
child: Column(children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: widget.webView,
|
||||
),
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -417,51 +125,4 @@ class _AboutUsPageState extends State<AboutUsPage> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildDeviceCard(BuildContext context,
|
||||
{required String title, required String imageUrl, required String type}) {
|
||||
return CustomCard(
|
||||
borderRadius: 20.rpx, // 圆角大小
|
||||
onTap: () {
|
||||
if (type != null) {
|
||||
if (type == '1') {
|
||||
Get.toNamed("/blueteethDevice");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
colors: [themeController.currentColor.sc17], // 背景色
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.sizeOf(context).height * 0.135,
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 220.rpx,
|
||||
),
|
||||
padding: EdgeInsetsDirectional.fromSTEB(77.rpx, 0, 21.rpx, 0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Inter',
|
||||
color: const Color(0xFFC2CED7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.rpx),
|
||||
child: Image.asset(
|
||||
imageUrl,
|
||||
width: 212.rpx,
|
||||
height: 168.rpx,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,8 +313,9 @@ class _SettingPageState extends State<SettingPage> {
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||||
onTap: () {
|
||||
TopSlideNotification.show(context,
|
||||
text: "待开发功能".tr);
|
||||
// TopSlideNotification.show(context,
|
||||
// text: "待开发功能".tr);
|
||||
Get.toNamed("/userSchemePage");
|
||||
},
|
||||
child: Container(
|
||||
child: Padding(
|
||||
@@ -364,8 +365,9 @@ class _SettingPageState extends State<SettingPage> {
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
onTap: () {
|
||||
TopSlideNotification.show(context,
|
||||
text: "待开发功能".tr);
|
||||
// TopSlideNotification.show(context,
|
||||
// text: "待开发功能".tr);
|
||||
Get.toNamed("/privacyPage");
|
||||
},
|
||||
child: Container(
|
||||
child: Padding(
|
||||
|
||||
@@ -32,8 +32,10 @@ import 'package:vbvs_app/pages/setting/language_setting.dart';
|
||||
import 'package:vbvs_app/pages/sleep_report/new_sleep_report_page.dart';
|
||||
import 'package:vbvs_app/pages/sleep_report/sleep_report_page.dart';
|
||||
import 'package:vbvs_app/pages/user/about_us_page.dart';
|
||||
import 'package:vbvs_app/pages/user/privacy_scheme_page.dart';
|
||||
import 'package:vbvs_app/pages/user/setting_page.dart';
|
||||
import 'package:vbvs_app/pages/user/update_user_page.dart';
|
||||
import 'package:vbvs_app/pages/user/user_scheme_page.dart';
|
||||
|
||||
ThemeController themeController = Get.find();
|
||||
|
||||
@@ -75,6 +77,8 @@ var routes = {
|
||||
"/repairListPage": (contxt) => RepairListPage(),
|
||||
"/newSleepReportPage": (contxt, {arguments}) =>
|
||||
NewSleepReportPage(date: arguments),
|
||||
"/userSchemePage": (contxt) => UserSchemePage(),
|
||||
"/privacyPage": (contxt) => PrivacySchemePage(),
|
||||
};
|
||||
|
||||
var onGenerateRoute = (RouteSettings settings) {
|
||||
|
||||
Reference in New Issue
Block a user