更新特殊处理测试账号
This commit is contained in:
@@ -54,14 +54,16 @@ class AppConstants {
|
|||||||
|
|
||||||
//系统参数
|
//系统参数
|
||||||
//运行打包APP模式
|
//运行打包APP模式
|
||||||
int ent_type = APPPackageType.MHT.code; //1.默认太和 2.欢睡 3.眠花糖
|
// int ent_type = APPPackageType.MHT.code; //1.默认太和 2.欢睡 3.眠花糖
|
||||||
// int ent_type = APPPackageType.TH.code; //1.默认太和 2.欢睡 3.眠花糖
|
int ent_type = APPPackageType.TH.code; //1.默认太和 2.欢睡 3.眠花糖
|
||||||
// int ent_type = APPPackageType.HUANSHUI.code; //1.默认太和 2.欢睡 3.眠花糖
|
// int ent_type = APPPackageType.HUANSHUI.code; //1.默认太和 2.欢睡 3.眠花糖
|
||||||
int text_length = 8;
|
int text_length = 8;
|
||||||
|
|
||||||
int wifi1 = -45;
|
int wifi1 = -45;
|
||||||
int wifi2 = -60;
|
int wifi2 = -60;
|
||||||
int wifi3 = -75;
|
int wifi3 = -75;
|
||||||
|
|
||||||
|
static bool is_test_account = true; //是否测试账号
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取协议地址
|
//获取协议地址
|
||||||
|
|||||||
@@ -74,7 +74,8 @@ class _DynamicReportDetailWidgetState extends State<DynamicReportDetailWidget> {
|
|||||||
SizedBox(height: 33.rpx),
|
SizedBox(height: 33.rpx),
|
||||||
_buildSleepDateWidgets(),
|
_buildSleepDateWidgets(),
|
||||||
SizedBox(height: 20.rpx),
|
SizedBox(height: 20.rpx),
|
||||||
_buildSleepDataModuleWidgets(),
|
if (!AppConstants.is_test_account)
|
||||||
|
_buildSleepDataModuleWidgets(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -104,62 +105,63 @@ class _DynamicReportDetailWidgetState extends State<DynamicReportDetailWidget> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ClickableContainer(
|
if (!AppConstants.is_test_account)
|
||||||
backgroundColor: Colors.transparent,
|
ClickableContainer(
|
||||||
highlightColor: themeController.currentColor.sc3,
|
backgroundColor: Colors.transparent,
|
||||||
borderRadius: 0,
|
highlightColor: themeController.currentColor.sc3,
|
||||||
padding: EdgeInsets.zero,
|
borderRadius: 0,
|
||||||
onTap: () {
|
padding: EdgeInsets.zero,
|
||||||
String mac = targetDevice['mac'];
|
onTap: () {
|
||||||
List<SleepDateWidget> selectedWidgets = widget.sleepDateWidgets
|
String mac = targetDevice['mac'];
|
||||||
.where((w) => w.isSelected == true)
|
List<SleepDateWidget> selectedWidgets = widget.sleepDateWidgets
|
||||||
.toList();
|
.where((w) => w.isSelected == true)
|
||||||
if (selectedWidgets.isNotEmpty) {
|
.toList();
|
||||||
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(
|
if (selectedWidgets.isNotEmpty) {
|
||||||
int.parse(selectedWidgets[0].time!));
|
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(
|
||||||
String time = MyUtils.formatBindTime(dateTime);
|
int.parse(selectedWidgets[0].time!));
|
||||||
// String sleepReportUrl =
|
String time = MyUtils.formatBindTime(dateTime);
|
||||||
// "${ServiceConstant.sleep_report_url}?mac=$mac&token=${ServiceConstant.sleep_token}&date=$time";
|
// String sleepReportUrl =
|
||||||
// Get.toNamed("/sleepReportPage", arguments: sleepReportUrl);
|
// "${ServiceConstant.sleep_report_url}?mac=$mac&token=${ServiceConstant.sleep_token}&date=$time";
|
||||||
Get.toNamed("/newSleepReportPage", arguments: {
|
// Get.toNamed("/sleepReportPage", arguments: sleepReportUrl);
|
||||||
'date': dateTime != null
|
Get.toNamed("/newSleepReportPage", arguments: {
|
||||||
? dateTime.millisecondsSinceEpoch
|
'date': dateTime != null
|
||||||
: DateTime.now().millisecondsSinceEpoch,
|
? dateTime.millisecondsSinceEpoch
|
||||||
"mac": mac,
|
: DateTime.now().millisecondsSinceEpoch,
|
||||||
'type': 1,
|
"mac": mac,
|
||||||
'name': 'sleep', //'sleep', 'heartRate' 或 'breathe'
|
'type': 1,
|
||||||
// 'itemName': widget.data['id'],
|
'name': 'sleep', //'sleep', 'heartRate' 或 'breathe'
|
||||||
'person': widget.targetDevice['person'],
|
// 'itemName': widget.data['id'],
|
||||||
});
|
'person': widget.targetDevice['person'],
|
||||||
} else {
|
});
|
||||||
TopSlideNotification.show(context,
|
} else {
|
||||||
text: "当前暂无数据".tr,
|
TopSlideNotification.show(context,
|
||||||
textColor: themeController.currentColor.sc9);
|
text: "当前暂无数据".tr,
|
||||||
}
|
textColor: themeController.currentColor.sc9);
|
||||||
},
|
}
|
||||||
child: Row(
|
},
|
||||||
children: [
|
child: Row(
|
||||||
Text(
|
children: [
|
||||||
'首页.报告详情'.tr,
|
Text(
|
||||||
style: TextStyle(
|
'首页.报告详情'.tr,
|
||||||
fontFamily: 'Inter',
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontFamily: 'Inter',
|
||||||
letterSpacing: 0.0,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
letterSpacing: 0.0,
|
||||||
|
color: themeController.currentColor.sc3,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
Padding(
|
padding: EdgeInsetsDirectional.fromSTEB(0, 6.rpx, 0, 0.rpx),
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(0, 6.rpx, 0, 0.rpx),
|
child: SvgPicture.asset(
|
||||||
child: SvgPicture.asset(
|
'assets/img/icon/arrow_right.svg',
|
||||||
'assets/img/icon/arrow_right.svg',
|
width: 14.rpx,
|
||||||
width: 14.rpx,
|
height: 14.rpx,
|
||||||
height: 14.rpx,
|
color: themeController.currentColor.sc3,
|
||||||
color: themeController.currentColor.sc3,
|
),
|
||||||
),
|
),
|
||||||
),
|
].divide(SizedBox(width: 22.rpx)),
|
||||||
].divide(SizedBox(width: 22.rpx)),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,37 +140,38 @@ class _SleepDateWidgetState extends State<SleepDateWidget> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
if (!AppConstants.is_test_account)
|
||||||
width: 0.2.rpx,
|
Container(
|
||||||
height: 2.4.rpx,
|
width: 0.2.rpx,
|
||||||
constraints: BoxConstraints(
|
height: 2.4.rpx,
|
||||||
minWidth: 123.rpx,
|
constraints: BoxConstraints(
|
||||||
minHeight: 47.rpx,
|
minWidth: 123.rpx,
|
||||||
),
|
minHeight: 47.rpx,
|
||||||
child: FFButtonWidget(
|
),
|
||||||
onPressed: () {
|
child: FFButtonWidget(
|
||||||
print('合格按钮点击');
|
onPressed: () {
|
||||||
},
|
print('合格按钮点击');
|
||||||
text: (widget.comment?.trim().isEmpty ?? true)
|
},
|
||||||
? '暂无'.tr
|
text: (widget.comment?.trim().isEmpty ?? true)
|
||||||
: widget.comment!,
|
? '暂无'.tr
|
||||||
options: FFButtonOptions(
|
: widget.comment!,
|
||||||
height: 40.rpx,
|
options: FFButtonOptions(
|
||||||
padding:
|
height: 40.rpx,
|
||||||
EdgeInsetsDirectional.fromSTEB(16.rpx, 0, 16.rpx, 0),
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
iconPadding: EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),
|
16.rpx, 0, 16.rpx, 0),
|
||||||
color:
|
iconPadding: EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),
|
||||||
widget.textColor ?? themeController.currentColor.sc4,
|
color: widget.textColor ??
|
||||||
textStyle: TextStyle(
|
themeController.currentColor.sc4,
|
||||||
// fontFamily: 'Inter Tight',
|
textStyle: TextStyle(
|
||||||
color: themeController.currentColor.sc3,
|
// fontFamily: 'Inter Tight',
|
||||||
letterSpacing: 0.0,
|
color: themeController.currentColor.sc3,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
),
|
||||||
|
elevation: 0,
|
||||||
|
borderRadius: BorderRadius.circular(50.rpx),
|
||||||
),
|
),
|
||||||
elevation: 0,
|
|
||||||
borderRadius: BorderRadius.circular(50.rpx),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -105,6 +105,11 @@ class LoginController extends GetControllerEx<LoginModel> {
|
|||||||
UserInfoController userInfoController = Get.find();
|
UserInfoController userInfoController = Get.find();
|
||||||
userInfoController.model.login = 1;
|
userInfoController.model.login = 1;
|
||||||
userInfoController.model.user = UserModel.fromJson(res.data);
|
userInfoController.model.user = UserModel.fromJson(res.data);
|
||||||
|
if (res.data['test'] != null && res.data['test'] == true) {
|
||||||
|
AppConstants.is_test_account = true;
|
||||||
|
} else {
|
||||||
|
AppConstants.is_test_account = false;
|
||||||
|
}
|
||||||
String token = response.headers['token']!.first;
|
String token = response.headers['token']!.first;
|
||||||
EasyDartModule.dio.token = token;
|
EasyDartModule.dio.token = token;
|
||||||
final box = GetStorage();
|
final box = GetStorage();
|
||||||
@@ -178,11 +183,14 @@ class LoginController extends GetControllerEx<LoginModel> {
|
|||||||
res.msg = "其他手机登录页.发送成功".tr;
|
res.msg = "其他手机登录页.发送成功".tr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
EasyDartModule.logger.info('msg:发送验证码成功');
|
||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
|
EasyDartModule.logger.error('msg:发送验证码失败:${response}');
|
||||||
return ApiResponse(code: -1, msg: "失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
EasyDartModule.logger.error('msg:发送验证码失败:${e}');
|
||||||
return ApiResponse(code: -1, msg: "失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,6 +225,11 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
|
|||||||
MyUtils.formatResponse(apiResponse, "保存成功".tr, "保存失败".tr);
|
MyUtils.formatResponse(apiResponse, "保存成功".tr, "保存失败".tr);
|
||||||
if (res.code == HttpStatusCodes.ok) {
|
if (res.code == HttpStatusCodes.ok) {
|
||||||
UserInfoController userInfoController = Get.find();
|
UserInfoController userInfoController = Get.find();
|
||||||
|
if (res.data['test'] != null && res.data['test'] == true) {
|
||||||
|
AppConstants.is_test_account = true;
|
||||||
|
} else {
|
||||||
|
AppConstants.is_test_account = false;
|
||||||
|
}
|
||||||
userInfoController.model.user = UserModel.fromJson(res.data);
|
userInfoController.model.user = UserModel.fromJson(res.data);
|
||||||
final box = GetStorage();
|
final box = GetStorage();
|
||||||
box.write('user', userInfoController.model.user!.toJson()); // 存储用户信息
|
box.write('user', userInfoController.model.user!.toJson()); // 存储用户信息
|
||||||
|
|||||||
@@ -189,12 +189,12 @@ Future<void> initWX() async {
|
|||||||
Fluwx fluwx = Fluwx();
|
Fluwx fluwx = Fluwx();
|
||||||
fluwx.registerApi(
|
fluwx.registerApi(
|
||||||
//请填写自己的微信appid
|
//请填写自己的微信appid
|
||||||
// appId: "wxeb2688220799e2c5", //太和
|
appId: "wxeb2688220799e2c5", //太和
|
||||||
appId: "wx929c548fea6af9c7", //眠花糖
|
// appId: "wx929c548fea6af9c7", //眠花糖
|
||||||
doOnAndroid: true,
|
doOnAndroid: true,
|
||||||
doOnIOS: true,
|
doOnIOS: true,
|
||||||
// universalLink: "https://app.he-info.com/theh/",
|
universalLink: "https://app.he-info.com/theh/",
|
||||||
universalLink: "https://zhmht.swes.com.cn/app/",
|
// universalLink: "https://zhmht.swes.com.cn/app/",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -629,7 +629,10 @@ void initEasyDartModule() {
|
|||||||
try {
|
try {
|
||||||
EasyDartModule.init(
|
EasyDartModule.init(
|
||||||
loggerConfig:
|
loggerConfig:
|
||||||
LoggerConfig(host: ServiceConstant.logService, serviceName: "智慧眠花糖在线2025-10-9"),
|
// LoggerConfig(host: ServiceConstant.logService, serviceName: "智慧眠花糖在线2025-10-9"),
|
||||||
|
LoggerConfig(
|
||||||
|
host: ServiceConstant.logService,
|
||||||
|
serviceName: "太和e护在线2025-10-14"),
|
||||||
webSocketConfig:
|
webSocketConfig:
|
||||||
WebSocketConfig(ServiceConstant.webSocketService, (data) {
|
WebSocketConfig(ServiceConstant.webSocketService, (data) {
|
||||||
// 接收到服务消息
|
// 接收到服务消息
|
||||||
@@ -701,7 +704,9 @@ Future<void> initLogin() async {
|
|||||||
EasyDartModule.dio.token = null;
|
EasyDartModule.dio.token = null;
|
||||||
} else {
|
} else {
|
||||||
userInfoController.model.login = 1;
|
userInfoController.model.login = 1;
|
||||||
await JPushUtil.initJPush();
|
if (AppConstants().ent_type == APPPackageType.MHT.code) {
|
||||||
|
await JPushUtil.initJPush();
|
||||||
|
}
|
||||||
updateAppSystemNotify(true);
|
updateAppSystemNotify(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -713,6 +718,11 @@ Future<void> initLogin() async {
|
|||||||
if (userMap != null) {
|
if (userMap != null) {
|
||||||
UserModel user = UserModel.fromJson(userMap);
|
UserModel user = UserModel.fromJson(userMap);
|
||||||
userInfoController.model.user = user;
|
userInfoController.model.user = user;
|
||||||
|
if (user.test != null && (user.test)!) {
|
||||||
|
AppConstants.is_test_account = true;
|
||||||
|
} else {
|
||||||
|
AppConstants.is_test_account = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(e);
|
print(e);
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ class UserModel {
|
|||||||
String? status;
|
String? status;
|
||||||
int? created_at;
|
int? created_at;
|
||||||
String? email;
|
String? email;
|
||||||
|
bool? test;
|
||||||
|
|
||||||
UserModel();
|
UserModel();
|
||||||
static UserModel fromJson(Map<String, dynamic> json) =>
|
static UserModel fromJson(Map<String, dynamic> json) =>
|
||||||
|
|||||||
@@ -1025,154 +1025,107 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
|||||||
color: themeController.currentColor.sc4,
|
color: themeController.currentColor.sc4,
|
||||||
),
|
),
|
||||||
SizedBox(height: 5.rpx),
|
SizedBox(height: 5.rpx),
|
||||||
Row(
|
if (!AppConstants.is_test_account)
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
Expanded(
|
children: [
|
||||||
child: CustomCard(
|
Expanded(
|
||||||
borderRadius: AppConstants().button_container_radius,
|
child: CustomCard(
|
||||||
onTap: () async {
|
borderRadius: AppConstants().button_container_radius,
|
||||||
if (widget.device['person'] != null) {
|
onTap: () async {
|
||||||
personController.currentPersonId.value =
|
if (widget.device['person'] != null) {
|
||||||
widget.device['_id'];
|
personController.currentPersonId.value =
|
||||||
personController.name.value =
|
widget.device['_id'];
|
||||||
widget.device['person']['name'];
|
personController.name.value =
|
||||||
personController.update_person_mac.value =
|
widget.device['person']['name'];
|
||||||
widget.device['mac'];
|
personController.update_person_mac.value =
|
||||||
personController.gender.value =
|
widget.device['mac'];
|
||||||
widget.device['person']['gender'] ?? 1;
|
personController.gender.value =
|
||||||
personController.weight?.value =
|
widget.device['person']['gender'] ?? 1;
|
||||||
widget.device['person']['weight'] == null
|
personController.weight?.value =
|
||||||
? ''
|
widget.device['person']['weight'] == null
|
||||||
: widget.device['person']['weight']
|
? ''
|
||||||
.toString();
|
: widget.device['person']['weight']
|
||||||
|
.toString();
|
||||||
|
|
||||||
personController.height.value =
|
personController.height.value =
|
||||||
widget.device['person']['height'] == null
|
widget.device['person']['height'] == null
|
||||||
? ''
|
? ''
|
||||||
: widget.device['person']['height']
|
: widget.device['person']['height']
|
||||||
.toString();
|
.toString();
|
||||||
|
|
||||||
personController.selectedDiseaseIds.value =
|
personController.selectedDiseaseIds.value =
|
||||||
widget.device['person']['disease'] ?? [];
|
widget.device['person']['disease'] ?? [];
|
||||||
personController.birthday.value =
|
personController.birthday.value =
|
||||||
widget.device['person']['birthday'] ?? '';
|
widget.device['person']['birthday'] ?? '';
|
||||||
personController.dateTime =
|
personController.dateTime =
|
||||||
MyUtils.formatBirthdayTime(
|
MyUtils.formatBirthdayTime(
|
||||||
widget.device['person']['birthday']);
|
widget.device['person']['birthday']);
|
||||||
} else {
|
} else {
|
||||||
personController.update_person_mac.value =
|
personController.update_person_mac.value =
|
||||||
widget.device['mac'];
|
widget.device['mac'];
|
||||||
personController.currentPersonId.value =
|
personController.currentPersonId.value =
|
||||||
widget.device['_id'];
|
widget.device['_id'];
|
||||||
personController.name.value = "";
|
personController.name.value = "";
|
||||||
personController.gender.value = 1;
|
personController.gender.value = 1;
|
||||||
personController.dateTime = null;
|
personController.dateTime = null;
|
||||||
personController.height.value = "";
|
personController.height.value = "";
|
||||||
personController.weight.value = "";
|
personController.weight.value = "";
|
||||||
personController.diseaseList.value = [];
|
personController.diseaseList.value = [];
|
||||||
}
|
}
|
||||||
await Get.toNamed("/updatePersonPage",
|
await Get.toNamed("/updatePersonPage",
|
||||||
arguments: widget.device['bind_type']);
|
arguments: widget.device['bind_type']);
|
||||||
bodyDeviceController.getDeviceList();
|
bodyDeviceController.getDeviceList();
|
||||||
},
|
},
|
||||||
colors: [
|
colors: [
|
||||||
themeController.currentColor.sc1,
|
themeController.currentColor.sc1,
|
||||||
themeController.currentColor.sc2,
|
themeController.currentColor.sc2,
|
||||||
],
|
],
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
height: MediaQuery.sizeOf(context).height * 0.0037,
|
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
minWidth: 143.rpx,
|
minWidth: 143.rpx,
|
||||||
minHeight: 61.rpx,
|
minHeight: 61.rpx,
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"体征检测设备.人员资料".tr,
|
|
||||||
style: TextStyle(
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: AppConstants().normal_text_fontSize,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
].divide(SizedBox(width: 17.rpx)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 20.rpx,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
// 使用 Expanded 来占据屏幕宽度
|
|
||||||
child: CustomCard(
|
|
||||||
borderRadius: AppConstants().button_container_radius,
|
|
||||||
onTap: () {
|
|
||||||
Get.toNamed("/instantBodyPage",
|
|
||||||
arguments: widget.device);
|
|
||||||
},
|
|
||||||
colors: [
|
|
||||||
themeController.currentColor.sc1,
|
|
||||||
themeController.currentColor.sc2,
|
|
||||||
],
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
height: MediaQuery.sizeOf(context).height * 0.0037,
|
|
||||||
constraints: BoxConstraints(
|
|
||||||
minWidth: 143.rpx,
|
|
||||||
minHeight: 61.rpx,
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"体征检测设备.实时体征".tr,
|
|
||||||
style: TextStyle(
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: AppConstants().normal_text_fontSize,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
].divide(SizedBox(width: 17.rpx)),
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"体征检测设备.人员资料".tr,
|
||||||
|
style: TextStyle(
|
||||||
|
color: themeController.currentColor.sc3,
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize:
|
||||||
|
AppConstants().normal_text_fontSize,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].divide(SizedBox(width: 17.rpx)),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(
|
||||||
],
|
width: 20.rpx,
|
||||||
),
|
),
|
||||||
SizedBox(
|
Expanded(
|
||||||
height: 20.rpx,
|
// 使用 Expanded 来占据屏幕宽度
|
||||||
),
|
child: CustomCard(
|
||||||
Row(
|
borderRadius: AppConstants().button_container_radius,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
onTap: () {
|
||||||
children: [
|
Get.toNamed("/instantBodyPage",
|
||||||
Expanded(
|
arguments: widget.device);
|
||||||
// 使用 Expanded 来占据屏幕宽度的一半
|
},
|
||||||
child: CustomCard(
|
colors: [
|
||||||
borderRadius: AppConstants().button_container_radius,
|
themeController.currentColor.sc1,
|
||||||
onTap: () {
|
themeController.currentColor.sc2,
|
||||||
// TopSlideNotification.show(context, text: "待开发功能".tr);
|
],
|
||||||
Get.toNamed("/messageReviewPage",
|
|
||||||
arguments: widget.device);
|
|
||||||
},
|
|
||||||
colors: [
|
|
||||||
themeController.currentColor.sc1,
|
|
||||||
themeController.currentColor.sc2,
|
|
||||||
],
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
height: MediaQuery.sizeOf(context).height * 0.0037,
|
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||||
@@ -1185,7 +1138,7 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"体征检测设备.消息回看".tr,
|
"体征检测设备.实时体征".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
@@ -1198,64 +1151,251 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
SizedBox(
|
),
|
||||||
width: 20.rpx,
|
if (!AppConstants.is_test_account)
|
||||||
),
|
SizedBox(
|
||||||
Expanded(
|
height: 20.rpx,
|
||||||
// 使用 Expanded 来占据屏幕宽度的一半
|
),
|
||||||
child: CustomCard(
|
if (!AppConstants.is_test_account)
|
||||||
borderRadius: AppConstants().button_container_radius,
|
Row(
|
||||||
onTap: () {
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
// String mac = widget.device['mac'];
|
children: [
|
||||||
// String sleepReportUrl =
|
Expanded(
|
||||||
// "${ServiceConstant.sleep_report_url}?mac=${mac}&token=${ServiceConstant.sleep_token}";
|
// 使用 Expanded 来占据屏幕宽度的一半
|
||||||
// Get.toNamed("/sleepReportPage",
|
child: CustomCard(
|
||||||
// arguments: sleepReportUrl);
|
borderRadius: AppConstants().button_container_radius,
|
||||||
Get.toNamed("/newSleepReportPage", arguments: {
|
onTap: () {
|
||||||
'date': DateTime.now().millisecondsSinceEpoch,
|
// TopSlideNotification.show(context, text: "待开发功能".tr);
|
||||||
"mac": widget.device['mac'],
|
Get.toNamed("/messageReviewPage",
|
||||||
'type': 1,
|
arguments: widget.device);
|
||||||
'name': 'sleep', //'sleep', 'heartRate' 或 'breathe'
|
},
|
||||||
// 'itemName': widget.data['id'],
|
colors: [
|
||||||
'person': widget.device['person'],
|
themeController.currentColor.sc1,
|
||||||
});
|
themeController.currentColor.sc2,
|
||||||
},
|
],
|
||||||
colors: [
|
child: Padding(
|
||||||
themeController.currentColor.sc1,
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
themeController.currentColor.sc2,
|
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||||
],
|
child: Container(
|
||||||
child: Padding(
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
constraints: BoxConstraints(
|
||||||
child: Container(
|
minWidth: 143.rpx,
|
||||||
alignment: Alignment.center,
|
minHeight: 61.rpx,
|
||||||
height: MediaQuery.sizeOf(context).height * 0.0037,
|
),
|
||||||
constraints: BoxConstraints(
|
child: Row(
|
||||||
minWidth: 143.rpx,
|
mainAxisSize: MainAxisSize.max,
|
||||||
minHeight: 61.rpx,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
),
|
children: [
|
||||||
child: Row(
|
Text(
|
||||||
mainAxisSize: MainAxisSize.max,
|
"体征检测设备.消息回看".tr,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
style: TextStyle(
|
||||||
children: [
|
color: themeController.currentColor.sc3,
|
||||||
Text(
|
fontFamily: 'Inter',
|
||||||
"体征检测设备.睡眠报告".tr,
|
fontSize:
|
||||||
style: TextStyle(
|
AppConstants().normal_text_fontSize,
|
||||||
color: themeController.currentColor.sc3,
|
letterSpacing: 0.0,
|
||||||
fontFamily: 'Inter',
|
),
|
||||||
fontSize: AppConstants().normal_text_fontSize,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
),
|
),
|
||||||
),
|
].divide(SizedBox(width: 17.rpx)),
|
||||||
].divide(SizedBox(width: 17.rpx)),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(
|
||||||
],
|
width: 20.rpx,
|
||||||
),
|
),
|
||||||
|
Expanded(
|
||||||
|
// 使用 Expanded 来占据屏幕宽度的一半
|
||||||
|
child: CustomCard(
|
||||||
|
borderRadius: AppConstants().button_container_radius,
|
||||||
|
onTap: () {
|
||||||
|
// String mac = widget.device['mac'];
|
||||||
|
// String sleepReportUrl =
|
||||||
|
// "${ServiceConstant.sleep_report_url}?mac=${mac}&token=${ServiceConstant.sleep_token}";
|
||||||
|
// Get.toNamed("/sleepReportPage",
|
||||||
|
// arguments: sleepReportUrl);
|
||||||
|
Get.toNamed("/newSleepReportPage", arguments: {
|
||||||
|
'date': DateTime.now().millisecondsSinceEpoch,
|
||||||
|
"mac": widget.device['mac'],
|
||||||
|
'type': 1,
|
||||||
|
'name': 'sleep', //'sleep', 'heartRate' 或 'breathe'
|
||||||
|
// 'itemName': widget.data['id'],
|
||||||
|
'person': widget.device['person'],
|
||||||
|
});
|
||||||
|
},
|
||||||
|
colors: [
|
||||||
|
themeController.currentColor.sc1,
|
||||||
|
themeController.currentColor.sc2,
|
||||||
|
],
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minWidth: 143.rpx,
|
||||||
|
minHeight: 61.rpx,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"体征检测设备.睡眠报告".tr,
|
||||||
|
style: TextStyle(
|
||||||
|
color: themeController.currentColor.sc3,
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize:
|
||||||
|
AppConstants().normal_text_fontSize,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].divide(SizedBox(width: 17.rpx)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
if (AppConstants.is_test_account)
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: CustomCard(
|
||||||
|
borderRadius: AppConstants().button_container_radius,
|
||||||
|
onTap: () async {
|
||||||
|
if (widget.device['person'] != null) {
|
||||||
|
personController.currentPersonId.value =
|
||||||
|
widget.device['_id'];
|
||||||
|
personController.name.value =
|
||||||
|
widget.device['person']['name'];
|
||||||
|
personController.update_person_mac.value =
|
||||||
|
widget.device['mac'];
|
||||||
|
personController.gender.value =
|
||||||
|
widget.device['person']['gender'] ?? 1;
|
||||||
|
personController.weight?.value =
|
||||||
|
widget.device['person']['weight'] == null
|
||||||
|
? ''
|
||||||
|
: widget.device['person']['weight']
|
||||||
|
.toString();
|
||||||
|
|
||||||
|
personController.height.value =
|
||||||
|
widget.device['person']['height'] == null
|
||||||
|
? ''
|
||||||
|
: widget.device['person']['height']
|
||||||
|
.toString();
|
||||||
|
|
||||||
|
personController.selectedDiseaseIds.value =
|
||||||
|
widget.device['person']['disease'] ?? [];
|
||||||
|
personController.birthday.value =
|
||||||
|
widget.device['person']['birthday'] ?? '';
|
||||||
|
personController.dateTime =
|
||||||
|
MyUtils.formatBirthdayTime(
|
||||||
|
widget.device['person']['birthday']);
|
||||||
|
} else {
|
||||||
|
personController.update_person_mac.value =
|
||||||
|
widget.device['mac'];
|
||||||
|
personController.currentPersonId.value =
|
||||||
|
widget.device['_id'];
|
||||||
|
personController.name.value = "";
|
||||||
|
personController.gender.value = 1;
|
||||||
|
personController.dateTime = null;
|
||||||
|
personController.height.value = "";
|
||||||
|
personController.weight.value = "";
|
||||||
|
personController.diseaseList.value = [];
|
||||||
|
}
|
||||||
|
await Get.toNamed("/updatePersonPage",
|
||||||
|
arguments: widget.device['bind_type']);
|
||||||
|
bodyDeviceController.getDeviceList();
|
||||||
|
},
|
||||||
|
colors: [
|
||||||
|
themeController.currentColor.sc1,
|
||||||
|
themeController.currentColor.sc2,
|
||||||
|
],
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minWidth: 143.rpx,
|
||||||
|
minHeight: 61.rpx,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"体征检测设备.人员资料".tr,
|
||||||
|
style: TextStyle(
|
||||||
|
color: themeController.currentColor.sc3,
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize:
|
||||||
|
AppConstants().normal_text_fontSize,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].divide(SizedBox(width: 17.rpx)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 20.rpx,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
// 使用 Expanded 来占据屏幕宽度的一半
|
||||||
|
child: CustomCard(
|
||||||
|
borderRadius: AppConstants().button_container_radius,
|
||||||
|
onTap: () {
|
||||||
|
// TopSlideNotification.show(context, text: "待开发功能".tr);
|
||||||
|
Get.toNamed("/messageReviewPage",
|
||||||
|
arguments: widget.device);
|
||||||
|
},
|
||||||
|
colors: [
|
||||||
|
themeController.currentColor.sc1,
|
||||||
|
themeController.currentColor.sc2,
|
||||||
|
],
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minWidth: 143.rpx,
|
||||||
|
minHeight: 61.rpx,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"体征检测设备.消息回看".tr,
|
||||||
|
style: TextStyle(
|
||||||
|
color: themeController.currentColor.sc3,
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize:
|
||||||
|
AppConstants().normal_text_fontSize,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].divide(SizedBox(width: 17.rpx)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
].divide(SizedBox(height: 0.rpx)),
|
].divide(SizedBox(height: 0.rpx)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -109,63 +109,64 @@ class _MessagePageState extends State<MessagePage> {
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
// 第一个容器,宽度占屏幕一半
|
// 第一个容器,宽度占屏幕一半
|
||||||
Obx(() {
|
if (!AppConstants.is_test_account)
|
||||||
return Expanded(
|
Obx(() {
|
||||||
child: ClickableContainer(
|
return Expanded(
|
||||||
padding: EdgeInsets.all(0),
|
child: ClickableContainer(
|
||||||
backgroundColor: Colors.transparent,
|
padding: EdgeInsets.all(0),
|
||||||
highlightColor:
|
backgroundColor: Colors.transparent,
|
||||||
themeController.currentColor.sc21,
|
highlightColor:
|
||||||
borderRadius: 8.rpx,
|
themeController.currentColor.sc21,
|
||||||
onTap: () => _onTabChanged(0),
|
borderRadius: 8.rpx,
|
||||||
child: Container(
|
onTap: () => _onTabChanged(0),
|
||||||
alignment: Alignment.center,
|
child: Container(
|
||||||
child: Stack(
|
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
clipBehavior: Clip.none,
|
child: Stack(
|
||||||
children: [
|
alignment: Alignment.center,
|
||||||
Text(
|
clipBehavior: Clip.none,
|
||||||
'体征消息'.tr,
|
children: [
|
||||||
style: TextStyle(
|
Text(
|
||||||
fontFamily: 'Inter',
|
'体征消息'.tr,
|
||||||
fontSize: AppConstants()
|
style: TextStyle(
|
||||||
.title_text_fontSize,
|
fontFamily: 'Inter',
|
||||||
color:
|
fontSize: AppConstants()
|
||||||
messageController
|
.title_text_fontSize,
|
||||||
.model.type ==
|
color:
|
||||||
2
|
messageController
|
||||||
? themeController
|
.model.type ==
|
||||||
.currentColor.sc3
|
2
|
||||||
: themeController
|
? themeController
|
||||||
.currentColor.sc2,
|
.currentColor.sc3
|
||||||
|
: themeController
|
||||||
|
.currentColor.sc2,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
Obx(() {
|
||||||
Obx(() {
|
return messageController.model
|
||||||
return messageController.model
|
.body_message_read ==
|
||||||
.body_message_read ==
|
1
|
||||||
1
|
? Positioned(
|
||||||
? Positioned(
|
top: -4,
|
||||||
top: -4,
|
right: -14,
|
||||||
right: -14,
|
child: Container(
|
||||||
child: Container(
|
width: 8,
|
||||||
width: 8,
|
height: 8,
|
||||||
height: 8,
|
decoration:
|
||||||
decoration:
|
const BoxDecoration(
|
||||||
const BoxDecoration(
|
color: Colors.red,
|
||||||
color: Colors.red,
|
shape:
|
||||||
shape:
|
BoxShape.circle,
|
||||||
BoxShape.circle,
|
),
|
||||||
),
|
),
|
||||||
),
|
)
|
||||||
)
|
: const SizedBox.shrink();
|
||||||
: const SizedBox.shrink();
|
}),
|
||||||
}),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
}),
|
||||||
}),
|
|
||||||
SizedBox(width: 10.rpx),
|
SizedBox(width: 10.rpx),
|
||||||
// 第二个容器,宽度占屏幕一半
|
// 第二个容器,宽度占屏幕一半
|
||||||
Obx(() {
|
Obx(() {
|
||||||
@@ -228,28 +229,51 @@ class _MessagePageState extends State<MessagePage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
// 动画线
|
// 动画线
|
||||||
Obx(() {
|
if (!AppConstants.is_test_account)
|
||||||
double lineWidth =
|
Obx(() {
|
||||||
MediaQuery.sizeOf(context).width * 0.5 -
|
double lineWidth =
|
||||||
20.rpx; // 每个容器占宽度的一半
|
MediaQuery.sizeOf(context).width * 0.5 -
|
||||||
return AnimatedPositioned(
|
20.rpx; // 每个容器占宽度的一半
|
||||||
duration: const Duration(milliseconds: 300),
|
return AnimatedPositioned(
|
||||||
curve: Curves.easeInOut,
|
duration: const Duration(milliseconds: 300),
|
||||||
bottom: 0,
|
curve: Curves.easeInOut,
|
||||||
left: messageController.model.type == 1
|
bottom: 0,
|
||||||
? 0
|
left: messageController.model.type == 1
|
||||||
: MediaQuery.sizeOf(context).width * 0.5 +
|
? 0
|
||||||
10.rpx, // 动态设置左侧位置
|
: MediaQuery.sizeOf(context).width * 0.5 +
|
||||||
child: Container(
|
10.rpx, // 动态设置左侧位置
|
||||||
width: lineWidth,
|
child: Container(
|
||||||
height: 4.rpx,
|
width: lineWidth,
|
||||||
decoration: BoxDecoration(
|
height: 4.rpx,
|
||||||
color: themeController.currentColor.sc2,
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(2.rpx),
|
color: themeController.currentColor.sc2,
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(2.rpx),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
}),
|
||||||
}),
|
if (AppConstants.is_test_account)
|
||||||
|
Obx(() {
|
||||||
|
double lineWidth = MediaQuery.sizeOf(context)
|
||||||
|
.width; // 每个容器占宽度的一半
|
||||||
|
messageController.model.type == 2;
|
||||||
|
return AnimatedPositioned(
|
||||||
|
duration: const Duration(milliseconds: 300),
|
||||||
|
curve: Curves.easeInOut,
|
||||||
|
bottom: 0,
|
||||||
|
left: 0, // 动态设置左侧位置
|
||||||
|
child: Container(
|
||||||
|
width: lineWidth,
|
||||||
|
height: 4.rpx,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: themeController.currentColor.sc2,
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(2.rpx),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ class _MinePageState extends State<MinePage> {
|
|||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'V1.0.2509.19',
|
'V1.0.2510.14',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
color: Color(0xFFD9E3EB),
|
color: Color(0xFFD9E3EB),
|
||||||
|
|||||||
Reference in New Issue
Block a user