更新样式

This commit is contained in:
wyf
2025-07-11 15:55:59 +08:00
parent 9fe66f0c0c
commit 1671e1a4b2
21 changed files with 273 additions and 179 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

View File

@@ -1,25 +0,0 @@
pluginManagement {
val flutterSdkPath = run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.7.0" apply false
id("org.jetbrains.kotlin.android") version "1.8.22" apply false
}
include(":app")

View File

@@ -1 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="30" height="30" viewBox="0 0 30 30"><g><g><g transform="matrix(0,-1,1,0,-30,30)"></g></g><g><g><g><path d="M18.657351015625,14.999606171875C18.657351015625,15.127536171875,18.609251015625,15.255586171874999,18.511351015625,15.353606171875C18.511351015625,15.353606171875,12.196167015625,21.668526171875,12.196167015625,21.668526171875C12.000366015625,21.864626171875003,11.684204015625,21.864626171875003,11.488159015625,21.668526171875C11.293334915625,21.473626171875,11.293334915625,21.157526171875,11.488159015625,20.961526171875C11.488159015625,20.961526171875,17.450321015625,14.999606171875,17.450321015625,14.999606171875C17.450321015625,14.999606171875,11.488159015625,9.037567171875,11.488159015625,9.037567171875C11.293334915625,8.842499171875,11.293334915625,8.526581171875,11.488159015625,8.330536171875C11.684204015625,8.135589571875,12.000366015625,8.135589571875,12.196167015625,8.330536171875C12.196167015625,8.330536171875,18.511351015625,14.646576171875001,18.511351015625,14.646576171875001C18.609251015625,14.744596171875,18.657351015625,14.871556171875,18.657351015625,14.999606171875C18.657351015625,14.999606171875,18.657351015625,14.999606171875,18.657351015625,14.999606171875Z" fill="#FFFFFF" fill-opacity="1"/></g></g></g></g></svg> <svg viewBox="0 0 7.31445 13.6306" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="7.31445312" height="13.6306152" fill="none" customFrame="#000000">
<g id="组 5613">
<g id="组 5612">
<g style="mix-blend-mode:normal">
<path id="路径 1399" d="M7.31445 6.81543C7.31445 6.94336 7.26562 7.07129 7.16797 7.16943L0.852539 13.4844C0.658203 13.6792 0.34082 13.6792 0.145508 13.4844C-0.0488281 13.2893 -0.0488281 12.9724 0.145508 12.7773L6.1084 6.81543L0.145508 0.853271C-0.0488281 0.658203 -0.0488281 0.342285 0.145508 0.14624C0.34082 -0.048584 0.658203 -0.048584 0.852539 0.14624L7.16797 6.4624C7.26562 6.55933 7.31445 6.68726 7.31445 6.81543Z" fill="rgb(255,255,255)" fill-rule="nonzero" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 764 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="30" height="30" viewBox="0 0 30 30"><g><g><g transform="matrix(0,-1,1,0,-30,30)"></g></g><g><g><g><path d="M18.657351015625,14.999606171875C18.657351015625,15.127536171875,18.609251015625,15.255586171874999,18.511351015625,15.353606171875C18.511351015625,15.353606171875,12.196167015625,21.668526171875,12.196167015625,21.668526171875C12.000366015625,21.864626171875003,11.684204015625,21.864626171875003,11.488159015625,21.668526171875C11.293334915625,21.473626171875,11.293334915625,21.157526171875,11.488159015625,20.961526171875C11.488159015625,20.961526171875,17.450321015625,14.999606171875,17.450321015625,14.999606171875C17.450321015625,14.999606171875,11.488159015625,9.037567171875,11.488159015625,9.037567171875C11.293334915625,8.842499171875,11.293334915625,8.526581171875,11.488159015625,8.330536171875C11.684204015625,8.135589571875,12.000366015625,8.135589571875,12.196167015625,8.330536171875C12.196167015625,8.330536171875,18.511351015625,14.646576171875001,18.511351015625,14.646576171875001C18.609251015625,14.744596171875,18.657351015625,14.871556171875,18.657351015625,14.999606171875C18.657351015625,14.999606171875,18.657351015625,14.999606171875,18.657351015625,14.999606171875Z" fill="#FFFFFF" fill-opacity="1"/></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -57,7 +57,7 @@ class _DynamicReportDetailWidgetState extends State<DynamicReportDetailWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Padding( return Padding(
padding: EdgeInsetsDirectional.fromSTEB(0, 25.rpx, 0, 25.rpx), padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0.rpx),
child: Container( child: Container(
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
@@ -119,9 +119,19 @@ class _DynamicReportDetailWidgetState extends State<DynamicReportDetailWidget> {
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch( DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(
int.parse(selectedWidgets[0].time!)); int.parse(selectedWidgets[0].time!));
String time = MyUtils.formatBindTime(dateTime); String time = MyUtils.formatBindTime(dateTime);
String sleepReportUrl = // String sleepReportUrl =
"${ServiceConstant.sleep_report_url}?mac=$mac&token=${ServiceConstant.sleep_token}&date=$time"; // "${ServiceConstant.sleep_report_url}?mac=$mac&token=${ServiceConstant.sleep_token}&date=$time";
Get.toNamed("/sleepReportPage", arguments: sleepReportUrl); // Get.toNamed("/sleepReportPage", arguments: sleepReportUrl);
Get.toNamed("/newSleepReportPage", arguments: {
'date': dateTime != null
? dateTime.millisecondsSinceEpoch
: DateTime.now().millisecondsSinceEpoch,
"mac": mac,
'type': 1,
'name': 'sleep', //'sleep', 'heartRate' 或 'breathe'
// 'itemName': widget.data['id'],
'person': widget.targetDevice['person'],
});
} else { } else {
TopSlideNotification.show(context, TopSlideNotification.show(context,
text: "当前暂无数据".tr, text: "当前暂无数据".tr,

View File

@@ -117,7 +117,7 @@ class _SleepDateWidgetState extends State<SleepDateWidget> {
letterSpacing: 0.0, letterSpacing: 0.0,
color: widget.textColor ?? color: widget.textColor ??
themeController.currentColor.sc4, themeController.currentColor.sc4,
fontWeight: FontWeight.bold, // 加粗 fontWeight: FontWeight.w500, // 加粗
), ),
), ),
if ((widget.score?.trim().isNotEmpty ?? false)) if ((widget.score?.trim().isNotEmpty ?? false))
@@ -158,7 +158,7 @@ class _SleepDateWidgetState extends State<SleepDateWidget> {
iconPadding: EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0), iconPadding: EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),
color: widget.textColor ?? themeController.currentColor.sc4, color: widget.textColor ?? themeController.currentColor.sc4,
textStyle: TextStyle( textStyle: TextStyle(
fontFamily: 'Inter Tight', // fontFamily: 'Inter Tight',
color: themeController.currentColor.sc3, color: themeController.currentColor.sc3,
letterSpacing: 0.0, letterSpacing: 0.0,
), ),

View File

@@ -6,6 +6,7 @@ import 'package:fluwx/fluwx.dart';
import 'package:get_storage/get_storage.dart'; import 'package:get_storage/get_storage.dart';
import 'package:json_annotation/json_annotation.dart'; import 'package:json_annotation/json_annotation.dart';
import 'package:vbvs_app/common/color/ServiceConstant.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/color/app_uri_status.dart';
import 'package:vbvs_app/common/util/CommonVariables.dart'; import 'package:vbvs_app/common/util/CommonVariables.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
@@ -13,6 +14,8 @@ import 'package:vbvs_app/common/util/requestWithLog.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart'; import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/time/countdown_controller.dart'; import 'package:vbvs_app/controller/time/countdown_controller.dart';
import 'package:vbvs_app/controller/user_info_controller.dart'; import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:vbvs_app/enum/APPPackageType.dart';
import 'package:vbvs_app/main.dart';
import 'package:vbvs_app/model/api_response.dart'; import 'package:vbvs_app/model/api_response.dart';
import 'package:vbvs_app/model/user_data.dart'; import 'package:vbvs_app/model/user_data.dart';
@@ -139,6 +142,7 @@ class LoginController extends GetControllerEx<LoginModel> {
if (languageController.selectLanguage != null) { if (languageController.selectLanguage != null) {
language = languageController.selectLanguage.value!.language_code; language = languageController.selectLanguage.value!.language_code;
} }
if (language != null && language.isNotEmpty) { if (language != null && language.isNotEmpty) {
if (queryUrl.contains("?")) { if (queryUrl.contains("?")) {
queryUrl += "&lang=$language"; queryUrl += "&lang=$language";
@@ -149,6 +153,9 @@ class LoginController extends GetControllerEx<LoginModel> {
var data = { var data = {
"userName": model.phone, "userName": model.phone,
}; };
if (AppConstants().ent_type == APPPackageType.HUANSHUI.code) {
data['code'] = "hzhskj";
}
var response = var response =
await EasyDartModule.dio.post(queryUrl, data: jsonEncode(data)); await EasyDartModule.dio.post(queryUrl, data: jsonEncode(data));
if (response != null) { if (response != null) {
@@ -203,7 +210,7 @@ class LoginController extends GetControllerEx<LoginModel> {
EasyDartModule.logger.error('msg:$data'); EasyDartModule.logger.error('msg:$data');
if (data) { if (data) {
//登陆成功 //登陆成功
// await dealBindProcess(); await dealBindProcess();
} }
}); });
} catch (e) { } catch (e) {

View File

@@ -398,6 +398,7 @@ class MyApp extends StatelessWidget {
// Get.lazyPut(() => UserInfoController()), // Get.lazyPut(() => UserInfoController()),
Get.put(GlobalController()), Get.put(GlobalController()),
Get.put(WeatherModelController()), Get.put(WeatherModelController()),
Get.lazyPut(() => ApplyRepairController()),
Get.lazyPut(() => MainPageController()), Get.lazyPut(() => MainPageController()),
Get.lazyPut(() => BlueteethBindController()), Get.lazyPut(() => BlueteethBindController()),
Get.lazyPut(() => PersonController()), Get.lazyPut(() => PersonController()),

View File

@@ -125,9 +125,10 @@ class _InstantBodyPageState extends State<InstantBodyPage>
// 心率 呼吸 体动 呼吸暂停 // 心率 呼吸 体动 呼吸暂停
if ("离床" == inBed) { if ("离床" == inBed) {
breathState = ""; breathState = "";
data["breathRate"] = 0; bodyMotion = 0;
data["heartRate"] = 0; breathrate = 0;
data["bodyMotion"] = 0; heartrate = 0;
snores = "";
} else { } else {
breathState = data["breathState"]; breathState = data["breathState"];
bodyMotion = data['bodyMotion']; bodyMotion = data['bodyMotion'];

View File

@@ -360,7 +360,8 @@ class _BlueteethDevicePageState extends State<BlueteethDevicePage> {
'最小信号强度'.tr, '最小信号强度'.tr,
style: TextStyle( style: TextStyle(
fontFamily: 'Inter', fontFamily: 'Inter',
color: stringToColor("#003058"), // color: stringToColor("#003058"),
color: Colors.white,
fontSize: 26.rpx, fontSize: 26.rpx,
letterSpacing: 0.0, letterSpacing: 0.0,
), ),

View File

@@ -1,7 +1,6 @@
import 'package:EasyDartModule/EasyDartModule.dart' as edm; import 'package:EasyDartModule/EasyDartModule.dart' as edm;
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:fluwx/fluwx.dart'; import 'package:fluwx/fluwx.dart';
import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/appConstants.dart';
@@ -19,7 +18,6 @@ import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:vbvs_app/controller/time/countdown_controller.dart'; import 'package:vbvs_app/controller/time/countdown_controller.dart';
import 'package:vbvs_app/controller/user_info_controller.dart'; import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:vbvs_app/main.dart';
import 'package:vbvs_app/model/api_response.dart'; import 'package:vbvs_app/model/api_response.dart';
class OtherLoginPage extends StatefulWidget { class OtherLoginPage extends StatefulWidget {
@@ -68,7 +66,10 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
//首次未注册的用户引导去手机号填写页面 //首次未注册的用户引导去手机号填写页面
//已注册的用户直接跳转首页 //已注册的用户直接跳转首页
if (CommonVariables.isNetWorkOn == false) { if (CommonVariables.isNetWorkOn == false) {
showToast("网络未连接,请开启设备网络后重试"); TopSlideNotification.show(context,
text: "网络未连接,请开启设备网络后重试".tr,
textColor: themeController.currentColor.sc9);
// showToast("网络未连接,请开启设备网络后重试");
return; return;
} }
ApiResponse msg = await loginController.loginByWechatCode(code); ApiResponse msg = await loginController.loginByWechatCode(code);
@@ -82,9 +83,13 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
// TODO 操作全部跳转页面前成功以后移除监听,防止重复监听,其他方式登录成功也需要移出监听 // TODO 操作全部跳转页面前成功以后移除监听,防止重复监听,其他方式登录成功也需要移出监听
// fluwxCancelable?.cancel(); // fluwxCancelable?.cancel();
} else if (errCode == -4) { } else if (errCode == -4) {
showToast("用户拒绝授权"); TopSlideNotification.show(context,
text: "用户拒绝授权".tr, textColor: themeController.currentColor.sc9);
// showToast("用户拒绝授权");
} else if (errCode == -2) { } else if (errCode == -2) {
showToast("用户取消授权"); TopSlideNotification.show(context,
text: "用户取消授权".tr, textColor: themeController.currentColor.sc9);
// showToast("用户取消授权");
} }
} }
}); });
@@ -127,13 +132,14 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
}, },
child: Padding( child: Padding(
padding: EdgeInsetsDirectional.fromSTEB( padding: EdgeInsetsDirectional.fromSTEB(
16.rpx, 10.rpx, 16.rpx, 10.rpx), 0.rpx, 10.rpx, 16.rpx, 10.rpx),
child: SvgPicture.asset( // child: SvgPicture.asset(
'assets/img/icon/arrow_left.svg', // 'assets/img/icon/arrow_left.svg',
width: 25.rpx, // width: 25.rpx,
height: 25.rpx, // 如果 SVG 中没有固定颜色,使用 color 设置 // height: 25.rpx, // 如果 SVG 中没有固定颜色,使用 color 设置
color: themeController.currentColor.sc3, // color: themeController.currentColor.sc3,
), // ),
child: returnIconButtomNew,
), ),
), ),
Expanded( Expanded(
@@ -152,7 +158,9 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
child: Align( child: Align(
alignment: AlignmentDirectional(0, 0), alignment: AlignmentDirectional(0, 0),
child: Text( child: Text(
AppConstants().ent_type == 1?'登录页.欢迎使用太和e护'.tr:"欢迎使用欢睡科技", AppConstants().ent_type == 1
? '登录页.欢迎使用太和e护'.tr
: "欢迎使用欢睡科技",
style: TextStyle( style: TextStyle(
fontFamily: 'Inter', fontFamily: 'Inter',
fontSize: 48.rpx, fontSize: 48.rpx,
@@ -281,8 +289,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
focusedErrorBorder: focusedErrorBorder:
OutlineInputBorder( OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: color: Colors.red,
Colors.red,
width: 1.rpx, width: 1.rpx,
), ),
borderRadius: borderRadius:
@@ -314,7 +321,6 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
), ),
), ),
), ),
Align( Align(
alignment: AlignmentDirectional(-1, 0), alignment: AlignmentDirectional(-1, 0),
child: Padding( child: Padding(
@@ -408,8 +414,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
focusedErrorBorder: focusedErrorBorder:
OutlineInputBorder( OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: color: Colors.red,
Colors.red,
width: 1.rpx, width: 1.rpx,
), ),
borderRadius: borderRadius:
@@ -698,8 +703,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
), ),
activeColor: activeColor:
stringToColor("#FF9F66"), //固定 stringToColor("#FF9F66"), //固定
checkColor: checkColor: Colors.white,
Colors.white,
), ),
)), )),
Expanded( Expanded(
@@ -804,7 +808,9 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
padding: EdgeInsetsDirectional.fromSTEB( padding: EdgeInsetsDirectional.fromSTEB(
0, 0, 0, 36.rpx), 0, 0, 0, 36.rpx),
child: Text( child: Text(
'登录页.其他登录方式'.tr, AppConstants().ent_type == 1
? '登录页.欢迎使用太和e护'.tr
: "欢迎使用欢睡科技",
style: TextStyle( style: TextStyle(
fontFamily: 'Inter', fontFamily: 'Inter',
fontSize: 26.rpx, fontSize: 26.rpx,

View File

@@ -994,12 +994,89 @@ class _HomePageState extends State<HomePage> {
); );
} }
// return Expanded(
// child: SingleChildScrollView(
// child: Column(
// children: List.generate(
// deviceList.length,
// (i) {
// String mac = macList[i];
// List<dynamic> dailyDataList =
// reportData[mac]!;
// Map? targetDevice =
// deviceList.firstWhereOrNull(
// (device) => device['mac'] == mac,
// );
// List stateModule = [];
// String currentTime = "";
// String goalMac = targetDevice?['mac'];
// var person = targetDevice?['person'];
// return DynamicReportDetailWidget(
// key: ValueKey(
// '${targetDevice!['mac']}_${homeController.model.type}'), // 添加唯一key
// targetDevice: targetDevice!,
// sleepDateWidgets: List.generate(
// dailyDataList.length,
// (j) {
// var dayData = dailyDataList[j];
// DateTime date =
// DateTime.fromMillisecondsSinceEpoch(
// dayData['time'] is String
// ? int.parse(dayData['time'])
// : dayData['time'],
// );
// if (dayData['selected'] != null &&
// dayData['selected'] == true &&
// dayData['state'] != null) {
// stateModule = dayData['state'];
// currentTime = dayData['time'];
// }
// return SleepDateWidget(
// mac: mac,
// time: dayData['time'],
// date: date,
// score: dayData['score']?['socre']
// ?.toString() ??
// '',
// comment: dayData['score']?['name'],
// textColor: dayData['score']
// ?['color'] ==
// null
// ? null
// : stringToColor(
// dayData['score']?['color']),
// isSelected: dayData['selected'],
// );
// },
// ),
// sleepDataModuleWidgets: stateModule
// .isNotEmpty
// ? List.generate(
// stateModule.length,
// (j) {
// stateModule[j]['onto'] = true;
// stateModule[j]['time'] =
// currentTime;
// stateModule[j]['mac'] = goalMac;
// stateModule[j]['person'] = person;
// return SleepDataModuleWidget(
// data: stateModule[j],
// );
// },
// )
// : [],
// );
// },
// ),
// ),
// ),
// );
return Expanded( return Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: List.generate( children: [
deviceList.length, SizedBox(height: 26.rpx), // 第一个上方间距
(i) { ...List.generate(deviceList.length, (i) {
String mac = macList[i]; String mac = macList[i];
List<dynamic> dailyDataList = List<dynamic> dailyDataList =
reportData[mac]!; reportData[mac]!;
@@ -1011,22 +1088,23 @@ class _HomePageState extends State<HomePage> {
String currentTime = ""; String currentTime = "";
String goalMac = targetDevice?['mac']; String goalMac = targetDevice?['mac'];
var person = targetDevice?['person']; var person = targetDevice?['person'];
return DynamicReportDetailWidget(
return Column(
children: [
DynamicReportDetailWidget(
key: ValueKey( key: ValueKey(
'${targetDevice!['mac']}_${homeController.model.type}'), // 添加唯一key '${targetDevice!['mac']}_${homeController.model.type}'),
targetDevice: targetDevice!, targetDevice: targetDevice!,
sleepDateWidgets: List.generate( sleepDateWidgets: List.generate(
dailyDataList.length, dailyDataList.length, (j) {
(j) {
var dayData = dailyDataList[j]; var dayData = dailyDataList[j];
DateTime date = DateTime date = DateTime
DateTime.fromMillisecondsSinceEpoch( .fromMillisecondsSinceEpoch(
dayData['time'] is String dayData['time'] is String
? int.parse(dayData['time']) ? int.parse(dayData['time'])
: dayData['time'], : dayData['time'],
); );
if (dayData['selected'] != null && if (dayData['selected'] == true &&
dayData['selected'] == true &&
dayData['state'] != null) { dayData['state'] != null) {
stateModule = dayData['state']; stateModule = dayData['state'];
currentTime = dayData['time']; currentTime = dayData['time'];
@@ -1047,27 +1125,29 @@ class _HomePageState extends State<HomePage> {
dayData['score']?['color']), dayData['score']?['color']),
isSelected: dayData['selected'], isSelected: dayData['selected'],
); );
}, }),
),
sleepDataModuleWidgets: stateModule sleepDataModuleWidgets: stateModule
.isNotEmpty .isNotEmpty
? List.generate( ? List.generate(stateModule.length,
stateModule.length,
(j) { (j) {
stateModule[j]['onto'] = true; stateModule[j]['onto'] = true;
stateModule[j]['time'] = stateModule[j]['time'] =
currentTime; currentTime;
stateModule[j]['mac'] = goalMac; stateModule[j]['mac'] = goalMac;
stateModule[j]['person'] = person; stateModule[j]['person'] =
person;
return SleepDataModuleWidget( return SleepDataModuleWidget(
data: stateModule[j], data: stateModule[j]);
); })
},
)
: [], : [],
);
},
), ),
SizedBox(
height:
26.rpx), // 每个 widget 下方间距(包括最后一个)
],
);
}),
],
), ),
), ),
); );

View File

@@ -629,13 +629,13 @@ class _MinePageState extends State<MinePage> {
// textColor: // textColor:
// themeController.currentColor.sc2, // themeController.currentColor.sc2,
// ); // );
Get.toNamed("/newSleepReportPage", // Get.toNamed("/newSleepReportPage",
arguments: { // arguments: {
'date': DateTime.now() // 'date': DateTime.now()
.millisecondsSinceEpoch, // .millisecondsSinceEpoch,
"mac": 'aaaaaaeeeeeq', // "mac": 'aaaaaaeeeeeq',
'type': 1 // 'type': 1
}); // });
} }
}, },
child: Container( child: Container(

View File

@@ -742,6 +742,9 @@ class _EPageState extends State<PersonPage> {
), ),
), ),
), ),
SizedBox(
height: 20.rpx,
),
], ],
), ),
), ),

View File

@@ -160,8 +160,10 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
Obx(() { Obx(() {
return Row( return SingleChildScrollView(
mainAxisSize: MainAxisSize.max, scrollDirection: Axis.horizontal, // 横向滚动
child: Row(
mainAxisSize: MainAxisSize.min, // 设置为 min避免撑满父组件宽度
children: deviceTypeController.deviceTypeList.value children: deviceTypeController.deviceTypeList.value
.map( .map(
(deviceType) => CustomCard( (deviceType) => CustomCard(
@@ -177,8 +179,7 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
await bodyDeviceController await bodyDeviceController
.getDeviceList(); // 等待数据加载 .getDeviceList(); // 等待数据加载
_updateRepairItemKeys(); // 清空后更新 keys _updateRepairItemKeys(); // 清空后更新 keys
repairController repairController.updateAll(); // 手动触发更新
.updateAll(); // 手动触发更新(如果未自动更新)
}, },
colors: deviceType['type'] == colors: deviceType['type'] ==
repairController.device_type.value repairController.device_type.value
@@ -202,12 +203,11 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
child: Align( child: Align(
alignment: AlignmentDirectional(0, 0), alignment: AlignmentDirectional(0, 0),
child: Text( child: Text(
deviceType[ deviceType['name'],
'name'], // 假设 deviceType 有 name 字段
style: TextStyle( style: TextStyle(
letterSpacing: 0.0, letterSpacing: 0.0,
color: color: themeController
themeController.currentColor.sc3, .currentColor.sc3,
fontSize: AppConstants() fontSize: AppConstants()
.normal_text_fontSize, .normal_text_fontSize,
), ),
@@ -218,6 +218,7 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
) )
.toList() .toList()
.divide(SizedBox(width: 25.rpx)), .divide(SizedBox(width: 25.rpx)),
),
); );
}), }),
Obx(() { Obx(() {

View File

@@ -102,7 +102,7 @@ class _RepairListPageState extends State<RepairListPage> {
child: Obx(() { child: Obx(() {
final isEmpty = repairController.repairHistory.value.isEmpty; final isEmpty = repairController.repairHistory.value.isEmpty;
if (isEmpty) { if (isEmpty) {
return Expanded(child: NullDataWidget()); return NullDataWidget();
} }
return SingleChildScrollView( return SingleChildScrollView(
child: Column( child: Column(