更新法语语言包
This commit is contained in:
@@ -204,6 +204,10 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
||||
height: 1,
|
||||
color: Colors
|
||||
.white),
|
||||
maxLines: 2,
|
||||
overflow:
|
||||
TextOverflow
|
||||
.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -612,6 +616,10 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
||||
height: 1,
|
||||
color: Colors
|
||||
.white),
|
||||
maxLines: 2,
|
||||
overflow:
|
||||
TextOverflow
|
||||
.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1038,33 +1046,78 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
||||
),
|
||||
),
|
||||
),
|
||||
// Flexible(
|
||||
// child: Container(
|
||||
// width: 300.rpx,
|
||||
// height: 62.rpx,
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius:
|
||||
// BorderRadius
|
||||
// .circular(50),
|
||||
// border: Border.all(
|
||||
// color: const Color(
|
||||
// 0xFF9EA4B7),
|
||||
// ),
|
||||
// ),
|
||||
// child: Align(
|
||||
// alignment:
|
||||
// const AlignmentDirectional(
|
||||
// 0, 0),
|
||||
// child: Text(
|
||||
// '上传设备故障照片'.tr,
|
||||
// style: TextStyle(
|
||||
// fontFamily:
|
||||
// 'Readex Pro',
|
||||
// color: const Color(
|
||||
// 0xFF9EA4B7),
|
||||
// fontSize: AppFontsize
|
||||
// .normal_text_size,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow
|
||||
// .ellipsis,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
Flexible(
|
||||
child: Container(
|
||||
width: 300.rpx,
|
||||
height: 62.rpx,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(50),
|
||||
border: Border.all(
|
||||
color: const Color(
|
||||
0xFF9EA4B7),
|
||||
),
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(
|
||||
0, 0),
|
||||
child: Text(
|
||||
'上传设备故障照片'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
child: IntrinsicWidth(
|
||||
child: Container(
|
||||
height: 62.rpx,
|
||||
decoration:
|
||||
BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(50),
|
||||
border: Border.all(
|
||||
color: const Color(
|
||||
0xFF9EA4B7),
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets
|
||||
.symmetric(
|
||||
horizontal:
|
||||
30.rpx),
|
||||
child: Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(
|
||||
0, 0),
|
||||
child: Text(
|
||||
'上传设备故障照片'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: const Color(
|
||||
0xFF9EA4B7),
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow:
|
||||
TextOverflow
|
||||
.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1319,7 +1372,8 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
color: themeController.currentColor.sc4),
|
||||
color: themeController
|
||||
.currentColor.sc4),
|
||||
enabledBorder:
|
||||
UnderlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
@@ -1474,6 +1528,10 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
||||
0,
|
||||
color: Colors
|
||||
.white),
|
||||
maxLines: 1,
|
||||
overflow:
|
||||
TextOverflow
|
||||
.ellipsis,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -1525,7 +1583,9 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
||||
'Readex Pro',
|
||||
letterSpacing:
|
||||
0,
|
||||
color: themeController.currentColor.sc4,
|
||||
color: themeController
|
||||
.currentColor
|
||||
.sc4,
|
||||
),
|
||||
enabledBorder:
|
||||
UnderlineInputBorder(
|
||||
@@ -1622,25 +1682,29 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
||||
0.038,
|
||||
constraints:
|
||||
BoxConstraints(
|
||||
minWidth: 60.rpx,
|
||||
minWidth: 60,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize:
|
||||
MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
'手机号码'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize:
|
||||
26.rpx,
|
||||
letterSpacing:
|
||||
0,
|
||||
color: Colors
|
||||
.white),
|
||||
),
|
||||
],
|
||||
child: Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'手机号码'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize:
|
||||
26.rpx,
|
||||
letterSpacing:
|
||||
0,
|
||||
height: 1,
|
||||
color: Colors
|
||||
.white),
|
||||
maxLines: 1,
|
||||
overflow:
|
||||
TextOverflow
|
||||
.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
@@ -1688,7 +1752,9 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
||||
'Readex Pro',
|
||||
letterSpacing:
|
||||
0,
|
||||
color: themeController.currentColor.sc4,
|
||||
color: themeController
|
||||
.currentColor
|
||||
.sc4,
|
||||
),
|
||||
enabledBorder:
|
||||
UnderlineInputBorder(
|
||||
|
||||
@@ -248,6 +248,9 @@ class BookInfoPage extends GetView<BookInfoController> {
|
||||
? stringToColor(
|
||||
'#D0D0D0')
|
||||
: Colors.white),
|
||||
maxLines: 1,
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
|
||||
@@ -166,7 +166,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"${device['bind'] == true ? "已被绑定" : "可绑定"}",
|
||||
"${device['bind'] == true ? "已被绑定".tr : "可绑定".tr}",
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx,
|
||||
color: device['bind'] == true
|
||||
|
||||
@@ -82,7 +82,6 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
|
||||
RxBool allSelect = false.obs; //升级是否全选
|
||||
RxBool autoUpgrade = false.obs; //是否自动升级
|
||||
|
||||
|
||||
void startStatusPolling() {
|
||||
updateDeviceStatus().then((res) {
|
||||
if (res.code == HttpStatusCodes.ok) {
|
||||
@@ -419,6 +418,28 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
|
||||
return result; // 在 requestWithLog 完成之后返回 result
|
||||
}
|
||||
|
||||
sendCommand(Map commandData) async {
|
||||
//todo 下发wifi指令
|
||||
if (commandData == null || commandData.isEmpty) {
|
||||
throw "指令数据不能为空";
|
||||
}
|
||||
//todo 填充蓝牙指令
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.sendWifiCommand;
|
||||
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
||||
await requestWithLog(
|
||||
logTitle: "下发wifi控制指令",
|
||||
method: MyHttpMethod.post,
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
},
|
||||
onFailure: (res) {
|
||||
throw "下发wifi控制指令失败: ${res.msg}";
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
//todo 解绑的时候删除自己所拥有的所有设备的睡眠习惯
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||
import 'package:vbvs_app/controller/person/person_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
|
||||
|
||||
@@ -245,9 +246,9 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
||||
Map editeData;
|
||||
BlueToothDataModel data =
|
||||
blueteethBindController.shareDevice;
|
||||
|
||||
editeData = {"mac".tr: data.mac};
|
||||
Get.toNamed("/deviceSharePage", arguments: editeData);
|
||||
|
||||
},
|
||||
colors: AppConstants().mhtButtongradientColors,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
@@ -367,7 +368,6 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -502,13 +502,19 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
'最小信号强度'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
color: stringToColor("#FFFFFF"),
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: boxConstraints.maxWidth * 0.3),
|
||||
child: Text(
|
||||
'最小信号强度'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
color: stringToColor("#FFFFFF"),
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
|
||||
@@ -895,37 +895,56 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'请选择城市'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
Expanded(
|
||||
flex: 1, // 左侧占1份权重(约33%)
|
||||
child: Text(
|
||||
'请选择城市'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
cityModels[index].id != null
|
||||
? MyUtils
|
||||
.getDetailedCityDisplayText(
|
||||
cityModels[index])
|
||||
: "请选择城市".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
cityModels[index].id != null
|
||||
? Colors.white
|
||||
: themeController
|
||||
.currentColor.sc4,
|
||||
fontSize: 30.rpx,
|
||||
Expanded(
|
||||
flex: 2, // 右侧占2份权重(约67%)
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment
|
||||
.end, // 右侧内容右对齐
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
cityModels[index].id != null
|
||||
? MyUtils
|
||||
.getDetailedCityDisplayText(
|
||||
cityModels[index])
|
||||
: "请选择城市".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
cityModels[index].id !=
|
||||
null
|
||||
? Colors.white
|
||||
: themeController
|
||||
.currentColor
|
||||
.sc4,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
textAlign:
|
||||
TextAlign.right, // 文本右对齐
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 16.rpx),
|
||||
Icon(Icons.expand_more,
|
||||
color: Colors.white,
|
||||
size: 48.rpx),
|
||||
],
|
||||
SizedBox(width: 16.rpx),
|
||||
Icon(Icons.expand_more,
|
||||
color: Colors.white,
|
||||
size: 48.rpx),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -973,52 +992,69 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'请选择时区'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
Expanded(
|
||||
flex: 1, // 左侧占1份权重(约33%)
|
||||
child: Text(
|
||||
'请选择时区'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
Obx(() {
|
||||
PeopleInfoController
|
||||
personController = Get.find();
|
||||
var aa =
|
||||
personController.timeZone.value;
|
||||
return Row(
|
||||
children: [
|
||||
Text(
|
||||
peopleList[index]['UTC'] ==
|
||||
null ||
|
||||
peopleList[index]
|
||||
['UTC'] ==
|
||||
""
|
||||
? "请选择时区".tr
|
||||
: peopleList[index]['UTC'],
|
||||
style: TextStyle(
|
||||
color: peopleList[index]
|
||||
['UTC'] !=
|
||||
null
|
||||
? Colors
|
||||
.white // 有时区时使用白色,保持和参考代码一致
|
||||
: themeController
|
||||
.currentColor.sc4,
|
||||
fontSize: 30
|
||||
.rpx, // 使用固定的30.rpx,而不是AppConstants().title_text_fontSize
|
||||
),
|
||||
),
|
||||
SizedBox(width: 16.rpx),
|
||||
Icon(
|
||||
Icons.expand_more,
|
||||
color: Colors
|
||||
.white, // 保持白色,和参考代码一致
|
||||
size: 48.rpx,
|
||||
),
|
||||
],
|
||||
);
|
||||
})
|
||||
Expanded(
|
||||
flex: 2, // 右侧占2份权重(约67%)
|
||||
child: Obx(() {
|
||||
PeopleInfoController
|
||||
personController = Get.find();
|
||||
var aa = personController
|
||||
.timeZone.value;
|
||||
return Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.end, // 右侧内容右对齐
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
peopleList[index]
|
||||
['UTC'] ==
|
||||
null ||
|
||||
peopleList[index]
|
||||
['UTC'] ==
|
||||
""
|
||||
? "请选择时区".tr
|
||||
: peopleList[index]
|
||||
['UTC'],
|
||||
style: TextStyle(
|
||||
color: peopleList[index]
|
||||
['UTC'] !=
|
||||
null
|
||||
? Colors.white
|
||||
: themeController
|
||||
.currentColor
|
||||
.sc4,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
textAlign: TextAlign
|
||||
.right, // 文本右对齐
|
||||
),
|
||||
),
|
||||
SizedBox(width: 16.rpx),
|
||||
Icon(
|
||||
Icons.expand_more,
|
||||
color: Colors.white,
|
||||
size: 48.rpx,
|
||||
),
|
||||
],
|
||||
);
|
||||
})),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -1063,38 +1099,92 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
);
|
||||
});
|
||||
},
|
||||
// child: Row(
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Text(
|
||||
// '慢病管理'.tr,
|
||||
// style: TextStyle(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Color(0xFF9EA4B7),
|
||||
// fontSize: 30.rpx,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
// Row(
|
||||
// children: [
|
||||
// Text(
|
||||
// getSelectedDiseaseNames(
|
||||
// diseaseIdsList[index]),
|
||||
// style: TextStyle(
|
||||
// color: diseaseIdsList[index]
|
||||
// .isNotEmpty
|
||||
// ? Colors.white
|
||||
// : themeController
|
||||
// .currentColor.sc4,
|
||||
// fontSize: 30.rpx,
|
||||
// ),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
// SizedBox(width: 16.rpx),
|
||||
// Icon(Icons.expand_more,
|
||||
// color: Colors.white,
|
||||
// size: 48.rpx),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'慢病管理'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
Expanded(
|
||||
flex: 1, // 设置左侧最大宽度权重
|
||||
child: Text(
|
||||
'慢病管理'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
getSelectedDiseaseNames(
|
||||
diseaseIdsList[index]),
|
||||
style: TextStyle(
|
||||
color: diseaseIdsList[index]
|
||||
.isNotEmpty
|
||||
? Colors.white
|
||||
: themeController
|
||||
.currentColor.sc4,
|
||||
fontSize: 30.rpx,
|
||||
Expanded(
|
||||
flex: 2, // 右侧内容占更多空间
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
getSelectedDiseaseNames(
|
||||
diseaseIdsList[index]),
|
||||
style: TextStyle(
|
||||
color: diseaseIdsList[index]
|
||||
.isNotEmpty
|
||||
? Colors.white
|
||||
: themeController
|
||||
.currentColor.sc4,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 16.rpx),
|
||||
Icon(Icons.expand_more,
|
||||
color: Colors.white,
|
||||
size: 48.rpx),
|
||||
],
|
||||
SizedBox(width: 16.rpx),
|
||||
Icon(Icons.expand_more,
|
||||
color: Colors.white,
|
||||
size: 48.rpx),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -57,6 +57,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
// _initController();
|
||||
blueteethBindController.shareDevice = widget.deviceInfo;
|
||||
await dealWifi(widget.deviceInfo.macA);
|
||||
print("object");
|
||||
});
|
||||
|
||||
@@ -165,7 +165,7 @@ class DevicePeopleInfo extends GetView<PeopleInfoController> {
|
||||
getInfoRow(
|
||||
context,
|
||||
"设备状态".tr,
|
||||
"${data["status"]?["status"] == 1 ? "已绑定" : data["status"]?["status"] == 0 ? "已绑定" : "-"}",
|
||||
"${data["status"]?["status"] == 1 ? "已绑定".tr : data["status"]?["status"] == 0 ? "已绑定".tr : "-"}",
|
||||
),
|
||||
getInfoRow(
|
||||
context, "MAC", "${data["mac"] ?? "-"}"),
|
||||
@@ -211,7 +211,7 @@ class DevicePeopleInfo extends GetView<PeopleInfoController> {
|
||||
getInfoRow(context, "姓名".tr,
|
||||
"${person["name"] ?? "-"}"),
|
||||
getInfoRow(context, "性别".tr,
|
||||
"${person["gender"] == null ? "-" : (person["gender"] == 1 ? "男" : "女")}"),
|
||||
"${person["gender"] == null ? "-" : (person["gender"] == 1 ? "男".tr : "女".tr)}"),
|
||||
getInfoRow(context, "身高".tr,
|
||||
"${person["height"] == null ? "-" : "${person["height"]}cm"}"),
|
||||
getInfoRow(context, "体重".tr,
|
||||
|
||||
@@ -161,8 +161,8 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
||||
hintText: '请输入对方手机号/邮箱号'.tr,
|
||||
hintStyle: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
color:
|
||||
themeController.currentColor.sc4,
|
||||
fontSize: 36.rpx,
|
||||
),
|
||||
enabledBorder:
|
||||
@@ -247,13 +247,17 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'允许对方控制和查看该设备'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
Expanded(
|
||||
child: Text(
|
||||
'允许对方控制和查看该设备'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
Obx(() {
|
||||
@@ -313,13 +317,17 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'仅允许对方查看该设备'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
Expanded(
|
||||
child: Text(
|
||||
'仅允许对方查看该设备'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
// ✅ 只包住响应式控件部分
|
||||
|
||||
@@ -271,96 +271,6 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
|
||||
return ApiResponse(code: -1, msg: "未知错误".tr); // Default return statement
|
||||
}
|
||||
|
||||
// Future<ApiResponse> getSleepReport() async {
|
||||
// try {
|
||||
// sleepReportData.value = {};
|
||||
// ApiResponse<Map<String, List<dynamic>>> apiResponse = ApiResponse(
|
||||
// code: -1,
|
||||
// msg: "请求失败".tr,
|
||||
// );
|
||||
|
||||
// if (deviceList.value.isEmpty) {
|
||||
// return ApiResponse(
|
||||
// code: HttpStatusCodes.ok,
|
||||
// msg: "请求成功".tr,
|
||||
// );
|
||||
// }
|
||||
|
||||
// String serviceAddress = ServiceConstant.service_address;
|
||||
// String serviceName = ServiceConstant.server_service;
|
||||
// String serviceApi = ServiceConstant.sleep_report;
|
||||
|
||||
// // for (var device in deviceList.value) {
|
||||
// // String mac = device['mac'] ?? "";
|
||||
// // if (mac.isEmpty) continue;
|
||||
|
||||
// // sleepReportData[mac] = []; // 初始化当前设备的数据列表
|
||||
|
||||
// // String queryUrl =
|
||||
// // "$serviceAddress$serviceName$serviceApi?mac=$mac&time=${DateTime.now().millisecondsSinceEpoch}";
|
||||
|
||||
// // try {
|
||||
// // String? language = "";
|
||||
// // if (languageController.selectLanguage != null) {
|
||||
// // language = languageController.selectLanguage.value!.language_code;
|
||||
// // }
|
||||
// // if (language != null && language.isNotEmpty) {
|
||||
// // if (queryUrl.contains("?")) {
|
||||
// // queryUrl += "&lang=$language";
|
||||
// // } else {
|
||||
// // queryUrl += "?lang=$language";
|
||||
// // }
|
||||
// // }
|
||||
// // var response = await EasyDartModule.dio.get(queryUrl);
|
||||
// // if (response != null) {
|
||||
// // var responseData = response.data is String
|
||||
// // ? jsonDecode(response.data)
|
||||
// // : response.data;
|
||||
|
||||
// // ApiResponse res =
|
||||
// // ApiResponse.fromJson(responseData, (object) => object);
|
||||
|
||||
// // if (res.code == HttpStatusCodes.ok && res.data != null) {
|
||||
// // // 确保数据是一个列表
|
||||
// // if (res.data is List) {
|
||||
// // sleepReportData[mac] = List.from(res.data);
|
||||
// // } else {
|
||||
// // sleepReportData[mac] = [res.data];
|
||||
// // }
|
||||
// // }
|
||||
// // }
|
||||
// // } catch (e) {
|
||||
// // EasyDartModule.logger.warning("请求设备 $mac 的睡眠数据失败: $e");
|
||||
// // }
|
||||
// // }
|
||||
// if (sleepReportData.value.isNotEmpty) {
|
||||
// // 遍历 Map 中的每一个键值对
|
||||
// sleepReportData.value.forEach((key, report) {
|
||||
// // 确保 report 列表不为空
|
||||
// if (report.isNotEmpty) {
|
||||
// // 获取该列表的最后一个元素
|
||||
// var lastElement = report.last;
|
||||
|
||||
// // 给最后一个元素添加 selected 属性
|
||||
// lastElement['selected'] = true; // 假设每个元素是一个 Map 类型
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// updateAll();
|
||||
|
||||
// return ApiResponse(
|
||||
// code: HttpStatusCodes.ok,
|
||||
// msg: "请求成功".tr,
|
||||
// data: sleepReportData,
|
||||
// );
|
||||
// } catch (e) {
|
||||
// EasyDartModule.logger.info("设备请求列表异常: $e");
|
||||
// DailyLogUtils.writeLog("设备请求列表异常: $e");
|
||||
// return ApiResponse(code: -1, msg: "未知错误".tr, data: {});
|
||||
// }
|
||||
// }
|
||||
|
||||
updateDeviceShow(device) async {
|
||||
try {
|
||||
ApiResponse apiResponse = ApiResponse(code: -1, msg: "操作失败".tr);
|
||||
|
||||
@@ -15,6 +15,7 @@ import 'package:vbvs_app/controller/sleep/sleep_report_controller.dart';
|
||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/weather/weather_controller.dart';
|
||||
import 'package:vbvs_app/enum/APPPackageType.dart';
|
||||
import 'package:vbvs_app/network/NetworkStatusController.dart';
|
||||
import 'package:vbvs_app/pages/main_bottom/component/main_page_b_bottom_change.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/FloatingSvgIcon.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/component/mht_bind_dialog.dart';
|
||||
@@ -45,6 +46,7 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
NetworkStatusController networkStatusController = Get.find();
|
||||
if (userInfoController.model.login == 1) {
|
||||
//查询人员信息列表
|
||||
deviceController.getPersonList();
|
||||
@@ -567,29 +569,11 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (formFieldController
|
||||
.value !=
|
||||
null) {
|
||||
// Get.toNamed(
|
||||
// "/newSleepReportPage",
|
||||
// arguments: {
|
||||
// 'mac':
|
||||
// formFieldController
|
||||
// .value!,
|
||||
// 'type': 1,
|
||||
// "person":
|
||||
// personInfo.value,
|
||||
// 'backgroundImg':
|
||||
// 'assets/images/new_background.png',
|
||||
// 'date': DateTime.now()
|
||||
// .millisecondsSinceEpoch,
|
||||
// 'person_show': false,
|
||||
// 'reportPadding': false,
|
||||
// },
|
||||
// );
|
||||
null) {
|
||||
sleepReportController
|
||||
.initParams(
|
||||
macValue:
|
||||
@@ -758,6 +742,10 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
color: stringToColor(
|
||||
"#FFFFFF"),
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow:
|
||||
TextOverflow
|
||||
.ellipsis,
|
||||
),
|
||||
SizedBox(
|
||||
height:
|
||||
|
||||
@@ -1158,7 +1158,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
newDiseaseIds;
|
||||
controller.updateAll();
|
||||
},
|
||||
title: "选择慢病".tr,
|
||||
title: "请选择慢病".tr,
|
||||
colors:
|
||||
DiseaseSelectionColors(
|
||||
pickerBackgroundColor:
|
||||
|
||||
@@ -69,7 +69,7 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
||||
bridge: bridge,
|
||||
onConnect: (args1, args2) {
|
||||
final devices = args1.devices as Map<String, dynamic>;
|
||||
final mac = args2 as String;
|
||||
final mac = args2 as String;
|
||||
if (devices.containsKey(mac)) {
|
||||
final device = devices[mac];
|
||||
ef.log('Minibleapp connected(Android): $mac -> $device');
|
||||
@@ -340,6 +340,17 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
||||
}
|
||||
return true;
|
||||
});
|
||||
bridge.sdk.sendCommand((args) async {
|
||||
ef.log('wifi控制指令: $args[0]');
|
||||
try {
|
||||
MHTBlueToothController blueToothController = Get.find();
|
||||
// await blueToothController.saveHabitData(args[0]);
|
||||
await blueToothController.sendCommand(args[0]);
|
||||
} catch (e) {
|
||||
ef.log("[wifi控制下发指令失败]:$e");
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
} catch (e, s) {
|
||||
ef.log('$e,$s');
|
||||
|
||||
@@ -1022,6 +1022,10 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow:
|
||||
TextOverflow
|
||||
.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1134,6 +1138,10 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow:
|
||||
TextOverflow
|
||||
.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1992,7 +2000,10 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment
|
||||
.start, // 改为顶部对齐
|
||||
children: [
|
||||
// 左边的选择框 - 保持不变
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(0, 0),
|
||||
@@ -2008,190 +2019,138 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: Theme(
|
||||
data: ThemeData(
|
||||
checkboxTheme:
|
||||
CheckboxThemeData(
|
||||
visualDensity:
|
||||
VisualDensity
|
||||
.compact,
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize
|
||||
.shrinkWrap,
|
||||
shape:
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
64),
|
||||
),
|
||||
data: ThemeData(
|
||||
checkboxTheme:
|
||||
CheckboxThemeData(
|
||||
visualDensity:
|
||||
VisualDensity
|
||||
.compact,
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize
|
||||
.shrinkWrap,
|
||||
shape:
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
64),
|
||||
),
|
||||
unselectedWidgetColor:
|
||||
Color(0xFFD3D3D3),
|
||||
),
|
||||
child: Obx(
|
||||
() => Checkbox(
|
||||
value: registerController
|
||||
unselectedWidgetColor:
|
||||
Color(0xFFD3D3D3),
|
||||
),
|
||||
child: Obx(
|
||||
() => Checkbox(
|
||||
value: registerController
|
||||
.model
|
||||
.register_agree ??
|
||||
false,
|
||||
onChanged:
|
||||
(newValue) async {
|
||||
registerController
|
||||
.model
|
||||
.register_agree ??
|
||||
false,
|
||||
onChanged:
|
||||
(newValue) async {
|
||||
registerController
|
||||
.model
|
||||
.register_agree =
|
||||
newValue;
|
||||
|
||||
controller
|
||||
.updateAll();
|
||||
registerController
|
||||
.updateAll();
|
||||
// 获取设备信息,需要用户点击确认隐私协议与用户协议选择框时才能获取
|
||||
// if (newValue ==
|
||||
// true) {
|
||||
// Deviceconfig
|
||||
// .initPlatformState();
|
||||
// }
|
||||
},
|
||||
side: BorderSide(
|
||||
width: 1.5,
|
||||
color:
|
||||
Colors.white,
|
||||
),
|
||||
activeColor:
|
||||
stringToColor(
|
||||
"#84F5FF"),
|
||||
checkColor:
|
||||
stringToColor(
|
||||
"#011D33"),
|
||||
.register_agree =
|
||||
newValue;
|
||||
controller
|
||||
.updateAll();
|
||||
registerController
|
||||
.updateAll();
|
||||
},
|
||||
side: BorderSide(
|
||||
width: 1.5,
|
||||
color: Colors.white,
|
||||
),
|
||||
)),
|
||||
activeColor:
|
||||
stringToColor(
|
||||
"#84F5FF"),
|
||||
checkColor:
|
||||
stringToColor(
|
||||
"#011D33"),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional
|
||||
.fromSTEB(0, 0, 0, 0),
|
||||
child: Container(
|
||||
width:
|
||||
MediaQuery.sizeOf(context)
|
||||
.width *
|
||||
0.622,
|
||||
height:
|
||||
MediaQuery.sizeOf(context)
|
||||
.height *
|
||||
1,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 466,
|
||||
minHeight: 30,
|
||||
),
|
||||
decoration: BoxDecoration(),
|
||||
child: Container(
|
||||
width: 100,
|
||||
height: 100,
|
||||
decoration: BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize:
|
||||
MainAxisSize.max,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: Text(
|
||||
'我已阅读并同意'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color:
|
||||
Colors.white,
|
||||
fontSize: 23.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
"/userPolicyPageNew",
|
||||
arguments:
|
||||
getPrivacy(
|
||||
2));
|
||||
},
|
||||
child: Text(
|
||||
'《用户协议》'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color:
|
||||
stringToColor(
|
||||
"FF9F66"),
|
||||
fontSize:
|
||||
23.rpx,
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: Text(
|
||||
'与'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color:
|
||||
Colors.white,
|
||||
fontSize: 23.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
"/privacyPolicyPageNew",
|
||||
arguments:
|
||||
getPrivacy(
|
||||
1));
|
||||
},
|
||||
child: Text(
|
||||
'《隐私协议》'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color:
|
||||
stringToColor(
|
||||
"FF9F66"),
|
||||
fontSize:
|
||||
23.rpx,
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
// 右边的文字部分 - 修改这里
|
||||
SizedBox(width: 8), // 添加一些间距
|
||||
Expanded(
|
||||
// 使用 Expanded 而不是 Flexible
|
||||
child: Container(
|
||||
decoration: BoxDecoration(),
|
||||
child: Wrap(
|
||||
// 使用 Wrap 替代 Row,实现自动换行
|
||||
spacing: 0, // 文字之间的水平间距
|
||||
runSpacing: 0, // 行之间的垂直间距
|
||||
children: [
|
||||
Text(
|
||||
'我已阅读并同意'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 23.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
"/userPolicyPageNew",
|
||||
arguments:
|
||||
getPrivacy(2));
|
||||
},
|
||||
child: Text(
|
||||
'《用户协议》'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: stringToColor(
|
||||
"FF9F66"),
|
||||
fontSize: 23.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'与'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 23.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
"/privacyPolicyPageNew",
|
||||
arguments:
|
||||
getPrivacy(1));
|
||||
},
|
||||
child: Text(
|
||||
'《隐私协议》'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: stringToColor(
|
||||
"FF9F66"),
|
||||
fontSize: 23.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
),
|
||||
Obx(() {
|
||||
@@ -2229,7 +2188,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
.fromSTEB(
|
||||
0, 0, 0, 0),
|
||||
child: Container(
|
||||
width: 36,
|
||||
width: 44,
|
||||
height: 36,
|
||||
decoration:
|
||||
BoxDecoration(),
|
||||
@@ -2247,44 +2206,26 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
context)
|
||||
.width *
|
||||
0.622,
|
||||
height: MediaQuery.sizeOf(
|
||||
context)
|
||||
.height *
|
||||
1,
|
||||
// constraints:
|
||||
// BoxConstraints(
|
||||
// minWidth: 466,
|
||||
// minHeight: 30,
|
||||
// ),
|
||||
decoration:
|
||||
BoxDecoration(),
|
||||
child: Container(
|
||||
// width: 100,
|
||||
// height: 100,
|
||||
decoration:
|
||||
BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize:
|
||||
MainAxisSize.max,
|
||||
child: Wrap(
|
||||
// 将 Row 改为 Wrap,实现自动换行
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: Text(
|
||||
'注:首次登录会自动创建账号'
|
||||
.tr,
|
||||
style:
|
||||
TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: stringToColor(
|
||||
"#FFFFFF"),
|
||||
fontSize:
|
||||
23.rpx,
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
Text(
|
||||
'注:首次登录会自动创建账号'
|
||||
.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: stringToColor(
|
||||
"#FFFFFF"),
|
||||
fontSize:
|
||||
23.rpx,
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -2371,17 +2312,17 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: "还没有账号?".tr,
|
||||
style: TextStyle(
|
||||
color: Colors
|
||||
.white, // 设置"还没有账号?"为白色
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: AppFontsize
|
||||
.small_text_size,
|
||||
),
|
||||
),
|
||||
// TextSpan(
|
||||
// text: "还没有账号?".tr,
|
||||
// style: TextStyle(
|
||||
// color: Colors
|
||||
// .white, // 设置"还没有账号?"为白色
|
||||
// fontFamily:
|
||||
// 'Readex Pro',
|
||||
// fontSize: AppFontsize
|
||||
// .small_text_size,
|
||||
// ),
|
||||
// ),
|
||||
TextSpan(
|
||||
text: '前往注册'.tr,
|
||||
style: TextStyle(
|
||||
|
||||
@@ -826,11 +826,206 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
||||
minHeight: 30,
|
||||
),
|
||||
decoration: BoxDecoration(),
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.start,
|
||||
// children: [
|
||||
// Align(
|
||||
// alignment:
|
||||
// AlignmentDirectional(0, 0),
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional
|
||||
// .fromSTEB(0, 3, 0, 0),
|
||||
// child: Container(
|
||||
// width: 36,
|
||||
// height: 36,
|
||||
// decoration: BoxDecoration(),
|
||||
// child: Align(
|
||||
// alignment:
|
||||
// AlignmentDirectional(
|
||||
// 0, 0),
|
||||
// child: Theme(
|
||||
// data: ThemeData(
|
||||
// checkboxTheme:
|
||||
// CheckboxThemeData(
|
||||
// visualDensity:
|
||||
// VisualDensity
|
||||
// .compact,
|
||||
// materialTapTargetSize:
|
||||
// MaterialTapTargetSize
|
||||
// .shrinkWrap,
|
||||
// shape:
|
||||
// RoundedRectangleBorder(
|
||||
// borderRadius:
|
||||
// BorderRadius
|
||||
// .circular(
|
||||
// 64),
|
||||
// ),
|
||||
// ),
|
||||
// unselectedWidgetColor:
|
||||
// Color(0xFFD3D3D3),
|
||||
// ),
|
||||
// child: Obx(
|
||||
// () => Checkbox(
|
||||
// value: controller
|
||||
// .model
|
||||
// .register_agree ??
|
||||
// false,
|
||||
// onChanged:
|
||||
// (newValue) async {
|
||||
// controller.model
|
||||
// .register_agree =
|
||||
// newValue;
|
||||
|
||||
// controller
|
||||
// .updateAll();
|
||||
// },
|
||||
// side: BorderSide(
|
||||
// width: 1.5,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// activeColor:
|
||||
// const Color(
|
||||
// 0xFF84F5FF),
|
||||
// checkColor:
|
||||
// Color(0xFF003058),
|
||||
// visualDensity:
|
||||
// VisualDensity(
|
||||
// horizontal:
|
||||
// -4.0,
|
||||
// vertical:
|
||||
// -4.0),
|
||||
// ),
|
||||
// )),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Flexible(
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional
|
||||
// .fromSTEB(0, 0, 0, 0),
|
||||
// child: Container(
|
||||
// width:
|
||||
// MediaQuery.sizeOf(context)
|
||||
// .width *
|
||||
// 0.622,
|
||||
// height:
|
||||
// MediaQuery.sizeOf(context)
|
||||
// .height *
|
||||
// 1,
|
||||
// constraints: BoxConstraints(
|
||||
// minWidth: 466,
|
||||
// minHeight: 30,
|
||||
// ),
|
||||
// decoration: BoxDecoration(),
|
||||
// child: Container(
|
||||
// width: 100,
|
||||
// height: 100,
|
||||
// decoration: BoxDecoration(),
|
||||
// child: Row(
|
||||
// mainAxisSize:
|
||||
// MainAxisSize.max,
|
||||
// children: [
|
||||
// Align(
|
||||
// alignment:
|
||||
// AlignmentDirectional(
|
||||
// 0, 0),
|
||||
// child: Text(
|
||||
// '我已阅读并同意'.tr,
|
||||
// style: TextStyle(
|
||||
// fontFamily:
|
||||
// 'Readex Pro',
|
||||
// color: Colors.white,
|
||||
// fontSize: 12,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Align(
|
||||
// alignment:
|
||||
// AlignmentDirectional(
|
||||
// 0, 0),
|
||||
// child: InkWell(
|
||||
// onTap: () {
|
||||
// Get.toNamed(
|
||||
// "/userPolicyPageNew",
|
||||
// arguments:
|
||||
// getPrivacy(
|
||||
// 2));
|
||||
// },
|
||||
// child: Text(
|
||||
// '《用户协议》'.tr,
|
||||
// style: TextStyle(
|
||||
// fontFamily:
|
||||
// 'Readex Pro',
|
||||
// color:
|
||||
// stringToColor(
|
||||
// "FF9F66"),
|
||||
// fontSize: 12,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Align(
|
||||
// alignment:
|
||||
// AlignmentDirectional(
|
||||
// 0, 0),
|
||||
// child: Text(
|
||||
// '与'.tr,
|
||||
// style: TextStyle(
|
||||
// fontFamily:
|
||||
// 'Readex Pro',
|
||||
// color: Colors.white,
|
||||
// fontSize: 12,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Align(
|
||||
// alignment:
|
||||
// AlignmentDirectional(
|
||||
// 0, 0),
|
||||
// child: InkWell(
|
||||
// onTap: () {
|
||||
// Get.toNamed(
|
||||
// "/privacyPolicyPageNew",
|
||||
// arguments:
|
||||
// getPrivacy(
|
||||
// 1));
|
||||
// },
|
||||
// child: Text(
|
||||
// '《隐私协议》'.tr,
|
||||
// style: TextStyle(
|
||||
// fontFamily:
|
||||
// 'Readex Pro',
|
||||
// color:
|
||||
// stringToColor(
|
||||
// "FF9F66"),
|
||||
// fontSize: 12,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment
|
||||
.start, // 添加这个,让文字与选择框顶部对齐
|
||||
children: [
|
||||
// 左边的选择框 - 保持不变
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(0, 0),
|
||||
@@ -846,173 +1041,133 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: Theme(
|
||||
data: ThemeData(
|
||||
checkboxTheme:
|
||||
CheckboxThemeData(
|
||||
visualDensity:
|
||||
VisualDensity
|
||||
.compact,
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize
|
||||
.shrinkWrap,
|
||||
shape:
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
64),
|
||||
),
|
||||
data: ThemeData(
|
||||
checkboxTheme:
|
||||
CheckboxThemeData(
|
||||
visualDensity:
|
||||
VisualDensity
|
||||
.compact,
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize
|
||||
.shrinkWrap,
|
||||
shape:
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(64),
|
||||
),
|
||||
unselectedWidgetColor:
|
||||
Color(0xFFD3D3D3),
|
||||
),
|
||||
child: Obx(
|
||||
() => Checkbox(
|
||||
value: controller
|
||||
.model
|
||||
.register_agree ??
|
||||
false,
|
||||
onChanged:
|
||||
(newValue) async {
|
||||
controller.model
|
||||
.register_agree =
|
||||
newValue;
|
||||
|
||||
controller
|
||||
.updateAll();
|
||||
},
|
||||
side: BorderSide(
|
||||
width: 1.5,
|
||||
color: Colors.white,
|
||||
),
|
||||
activeColor:
|
||||
const Color(
|
||||
0xFF84F5FF),
|
||||
checkColor:
|
||||
Color(0xFF003058),
|
||||
visualDensity:
|
||||
VisualDensity(
|
||||
horizontal:
|
||||
-4.0,
|
||||
vertical:
|
||||
-4.0),
|
||||
unselectedWidgetColor:
|
||||
Color(0xFFD3D3D3),
|
||||
),
|
||||
child: Obx(
|
||||
() => Checkbox(
|
||||
value: controller.model
|
||||
.register_agree ??
|
||||
false,
|
||||
onChanged:
|
||||
(newValue) async {
|
||||
controller.model
|
||||
.register_agree =
|
||||
newValue;
|
||||
controller
|
||||
.updateAll();
|
||||
},
|
||||
side: BorderSide(
|
||||
width: 1.5,
|
||||
color: Colors.white,
|
||||
),
|
||||
)),
|
||||
activeColor:
|
||||
const Color(
|
||||
0xFF84F5FF),
|
||||
checkColor:
|
||||
Color(0xFF003058),
|
||||
visualDensity:
|
||||
VisualDensity(
|
||||
horizontal: -4.0,
|
||||
vertical: -4.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional
|
||||
.fromSTEB(0, 0, 0, 0),
|
||||
child: Container(
|
||||
width:
|
||||
MediaQuery.sizeOf(context)
|
||||
.width *
|
||||
0.622,
|
||||
height:
|
||||
MediaQuery.sizeOf(context)
|
||||
.height *
|
||||
1,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 466,
|
||||
minHeight: 30,
|
||||
),
|
||||
decoration: BoxDecoration(),
|
||||
child: Container(
|
||||
width: 100,
|
||||
height: 100,
|
||||
decoration: BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize:
|
||||
MainAxisSize.max,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: Text(
|
||||
'我已阅读并同意'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
"/userPolicyPageNew",
|
||||
arguments:
|
||||
getPrivacy(
|
||||
2));
|
||||
},
|
||||
child: Text(
|
||||
'《用户协议》'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color:
|
||||
stringToColor(
|
||||
"FF9F66"),
|
||||
fontSize: 12,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: Text(
|
||||
'与'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
"/privacyPolicyPageNew",
|
||||
arguments:
|
||||
getPrivacy(
|
||||
1));
|
||||
},
|
||||
child: Text(
|
||||
'《隐私协议》'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color:
|
||||
stringToColor(
|
||||
"FF9F66"),
|
||||
fontSize: 12,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
SizedBox(width: 8), // 添加间距
|
||||
|
||||
// 右边的文字部分 - 修改这里
|
||||
Expanded(
|
||||
// 使用 Expanded 替代 Flexible
|
||||
child: Container(
|
||||
decoration: BoxDecoration(),
|
||||
child: Wrap(
|
||||
// 将 Row 改为 Wrap,实现自动换行
|
||||
spacing: 4, // 文字之间的水平间距
|
||||
runSpacing: 0, // 行之间的垂直间距
|
||||
alignment:
|
||||
WrapAlignment.start, // 左对齐
|
||||
crossAxisAlignment:
|
||||
WrapCrossAlignment
|
||||
.center, // 垂直居中
|
||||
children: [
|
||||
Text(
|
||||
'我已阅读并同意'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
"/userPolicyPageNew",
|
||||
arguments:
|
||||
getPrivacy(2));
|
||||
},
|
||||
child: Text(
|
||||
'《用户协议》'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: stringToColor(
|
||||
"FF9F66"),
|
||||
fontSize: 12,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'与'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
"/privacyPolicyPageNew",
|
||||
arguments:
|
||||
getPrivacy(1));
|
||||
},
|
||||
child: Text(
|
||||
'《隐私协议》'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: stringToColor(
|
||||
"FF9F66"),
|
||||
fontSize: 12,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -125,29 +125,37 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 158
|
||||
.rpx, // 设置最小宽度为 100
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'输入手机号码'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
Flexible(
|
||||
flex: 1,
|
||||
child: Container(
|
||||
constraints:
|
||||
BoxConstraints(
|
||||
minWidth: 158
|
||||
.rpx, // 设置最小宽度为 100
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'输入手机号码'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow
|
||||
.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
flex: 2,
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(
|
||||
context)
|
||||
@@ -264,29 +272,37 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 158
|
||||
.rpx, // 设置最小宽度为 100
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'输入验证码'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
Flexible(
|
||||
flex: 1,
|
||||
child: Container(
|
||||
constraints:
|
||||
BoxConstraints(
|
||||
minWidth: 158
|
||||
.rpx, // 设置最小宽度为 100
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'输入验证码'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow
|
||||
.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
flex: 2,
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(
|
||||
context)
|
||||
@@ -483,6 +499,10 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
maxLines:
|
||||
1,
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
),
|
||||
);
|
||||
}),
|
||||
@@ -500,30 +520,37 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
Flexible(
|
||||
flex: 1,
|
||||
child: Container(
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 158.rpx,
|
||||
maxWidth:
|
||||
158.rpx // 设置最小宽度为 100
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'输入新密码'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
// maxWidth: 158
|
||||
// .rpx // 设置最小宽度为 100
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'输入新密码'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow
|
||||
.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
flex: 2,
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(
|
||||
context)
|
||||
@@ -665,31 +692,37 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
Flexible(
|
||||
flex: 1,
|
||||
child: Container(
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 158.rpx,
|
||||
maxWidth:
|
||||
158.rpx // 设置最小宽度为 100
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'确认新密码'.tr,
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
// maxWidth: 158
|
||||
// .rpx // 设置最小宽度为 100
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'确认新密码'.tr,
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
overflow: TextOverflow
|
||||
.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
flex: 2,
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(
|
||||
context)
|
||||
|
||||
Reference in New Issue
Block a user