合并更新

This commit is contained in:
wyf
2025-07-07 15:57:52 +08:00
parent 471fbc94b7
commit 671ac832a5
12 changed files with 223 additions and 96 deletions

View File

@@ -79,14 +79,12 @@ class _HomeDeviceStausWidgetState extends State<HomeDeviceStausWidget> {
try {
var device = widget.deviceStatus;
WebviewTestController webviewTestController = Get.find();
var future = webviewTestController.web.jsbridge?.dart
.appToHtmlDevice(device);
Future.delayed(Duration(seconds: 5), () {
return;
});
await future;
await webviewTestController.web.jsbridge?.dart
.pageActive(false);
await Future.delayed(Duration(seconds: 1));
await webviewTestController.web.jsbridge?.dart
.appToHtmlDevice(device);
MainPageBBottomChange.jumpTo(2);
} catch (e) {
DailyLogUtils.writeError("发生异常: $e");

View File

@@ -102,6 +102,7 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
homeController.updateAll();
});
}
//themeController.currentColor.sc5,
if (homeController.personnelList.value.length != 0)
return Padding(
padding: EdgeInsetsDirectional.fromSTEB(
@@ -125,6 +126,16 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'健康报告'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color:
themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx,
),
),
ScrollbarTheme(
data: ScrollbarThemeData(
thumbColor: MaterialStateProperty.all(
@@ -278,6 +289,7 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
'assets/images/new_background.png',
'arrow': false,
'noBackImg': true,
'person_show': false,
},
),
);

View File

@@ -1,3 +1,6 @@
import 'dart:async';
import 'package:easyweb/utils/appmanger.dart';
import 'package:ef/ef.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
@@ -34,6 +37,7 @@ class _NewHomePageState extends State<NewHomePage> {
GlobalController gloablController = Get.find();
WeatherModelController weatherModelController = Get.find();
// var selectedDayIndex = (6).obs;
StreamSubscription? _newVersionSubscription;
@override
void initState() {
@@ -71,6 +75,28 @@ class _NewHomePageState extends State<NewHomePage> {
homeController.homeSleepDays.value.length - 1;
}
});
try {
_newVersionSubscription =
ef.kvRoot.appmanger.onAppUpdate.stream.listen((MiniAppPkg pkg) {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text("发现新版本"),
content: Text("新版本号:${pkg.version}"),
actions: [
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: Text("知道了"),
),
],
);
},
);
});
} catch (e) {
print(e);
}
}
getWeekName(int i) {