diff --git a/lib/common/util/MyUtils.dart b/lib/common/util/MyUtils.dart index 628ea00..f5abeed 100644 --- a/lib/common/util/MyUtils.dart +++ b/lib/common/util/MyUtils.dart @@ -418,11 +418,22 @@ String time_08_Formatter(String time) { .format(DateTime.parse(time).toLocal()); } -String time_08_Formatter_pattern(String time, String pattern) { - if (time == null || time == "") { - return ""; +// String time_08_Formatter_pattern(String time, String pattern) { +// if (time == null || time == "") { +// return ""; +// } +// return DateFormat(pattern).format(DateTime.parse(time).toLocal()); +// } + +String time_08_Formatter_pattern(dynamic date, String pattern) { + if (date == null || date.toString().isEmpty) return "-"; + try { + String normalized = date.toString().replaceAll("/", "-"); + DateTime dt = DateTime.parse(normalized); + return DateFormat(pattern).format(dt); + } catch (e) { + return "-"; } - return DateFormat(pattern).format(DateTime.parse(time).toLocal()); } enum LoadingDialogIcon { ble, wifi, none } diff --git a/lib/controller/mh_controller/book_info_controller.dart b/lib/controller/mh_controller/book_info_controller.dart index 998360c..f3864a5 100644 --- a/lib/controller/mh_controller/book_info_controller.dart +++ b/lib/controller/mh_controller/book_info_controller.dart @@ -68,13 +68,13 @@ class BookInfoController extends GetControllerEx { } submitData(id) { - String tel = userInfoController.model?.user?.tel ?? ""; - if (tel.isEmpty) { + String phone = userInfoController.model?.user?.phone ?? ""; + if (phone.isEmpty) { showToast("用户未存在手机号"); return; } return ApiService.reservation.post("/agent/userBook/submitBook", data: { - "extUserId": tel, + "extUserId": phone, "storeId": id, "realName": model.userName, "userPhone": model.userPhone, diff --git a/lib/controller/mh_controller/people_info_controller.dart b/lib/controller/mh_controller/people_info_controller.dart index 14a36be..9a8f5f3 100644 --- a/lib/controller/mh_controller/people_info_controller.dart +++ b/lib/controller/mh_controller/people_info_controller.dart @@ -1,13 +1,11 @@ import 'package:ef/ef.dart'; import 'package:json_annotation/json_annotation.dart'; +import 'package:vbvs_app/common/color/ServiceConstant.dart'; +import 'package:vbvs_app/common/util/requestWithLog.dart'; import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; part 'people_info_controller.g.dart'; // 由json_serializable自动生成的部分 -class PeopleInfoModel { - List peopleList = [PeopleInfoPojo(), PeopleInfoPojo()]; -} - @JsonSerializable() class PeopleInfoPojo { String? name; @@ -15,8 +13,8 @@ class PeopleInfoPojo { String? height; String? weight; DateTime? birthday; - String? tel; - String? emergencyContact; + String? phone; + String? contact; PeopleInfoPojo(); @@ -35,9 +33,9 @@ class PeopleInfoPojo { Map toJson() => _$PeopleInfoPojoToJson(this); } -class PeopleInfoController extends GetControllerEx { +class PeopleInfoController extends GetControllerEx { PeopleInfoController() { - attr = GetModel(PeopleInfoModel()).obs; + attr = GetModel(PeopleInfoPojo()).obs; } GlobalController get glcontroller => Get.find(); diff --git a/lib/controller/mh_controller/people_info_controller.g.dart b/lib/controller/mh_controller/people_info_controller.g.dart index 1c66eb4..9a2db2f 100644 --- a/lib/controller/mh_controller/people_info_controller.g.dart +++ b/lib/controller/mh_controller/people_info_controller.g.dart @@ -15,8 +15,8 @@ PeopleInfoPojo _$PeopleInfoPojoFromJson(Map json) => ..birthday = json['birthday'] == null ? null : DateTime.parse(json['birthday'] as String) - ..tel = json['tel'] as String? - ..emergencyContact = json['emergencyContact'] as String?; + ..phone = json['tel'] as String? + ..contact = json['emergencyContact'] as String?; Map _$PeopleInfoPojoToJson(PeopleInfoPojo instance) => { @@ -25,6 +25,6 @@ Map _$PeopleInfoPojoToJson(PeopleInfoPojo instance) => 'height': instance.height, 'weight': instance.weight, 'birthday': instance.birthday?.toIso8601String(), - 'tel': instance.tel, - 'emergencyContact': instance.emergencyContact, + 'tel': instance.phone, + 'emergencyContact': instance.contact, }; diff --git a/lib/pages/mh_page/MattressControl.dart b/lib/pages/mh_page/MattressControl.dart index 3eeda78..193a94f 100644 --- a/lib/pages/mh_page/MattressControl.dart +++ b/lib/pages/mh_page/MattressControl.dart @@ -16,6 +16,36 @@ class MattressControlPage extends StatefulWidget { class _MattressControlPageState extends State { final controller = Get.put(ControlCardController()); + final data ={ + "_id": "6840ee86693db58798000000", + "uid": "68465947a0cff49592000000", + "bind_type": 1, + "device_type": 1, + "mac": "B43A45C3E9A8", + "bind_mac": null, + "position": 0, + "share_uid": null, + "person": { + "name": "bb", + "gender": 0, + "birthday": "2025/05/27", + "weight": "10", + "height": "100", + "disease": [] + }, + "show": true, + "create_time": 1749085830536, + "shareNum": 0, + "status": { + "signal": -1, + "status": 0, + "inBed": 0, + "upgrade": 0, + "failure": 0, + "updateTime": 1749110182000 + }, + "code": "B43A45C3E9A8" + }; int selectedIndex = 1; // 当前选中的tab索引 @override Widget build(BuildContext context) { @@ -98,7 +128,7 @@ class _MattressControlPageState extends State { highlightColor: Colors.transparent, padding: EdgeInsets.only(right: 38.rpx), onTap: () { - Get.toNamed('/bluetoothPage'); + Get.toNamed('/bluetoothPage', arguments: data); }, child: Icon(Icons.tune, color: Colors.white, size: 42.rpx)) diff --git a/lib/pages/mh_page/apply_repair_page.dart b/lib/pages/mh_page/apply_repair_page.dart index 83ce71b..a3a628c 100644 --- a/lib/pages/mh_page/apply_repair_page.dart +++ b/lib/pages/mh_page/apply_repair_page.dart @@ -1810,6 +1810,7 @@ class ApplyRepairPage extends GetView { // // 错误处理 // print('Error: $error'); // }); + controller.submitRepair(context); }, colors: const [ Color(0xFFFCFCFC), diff --git a/lib/pages/mh_page/bluetooth.dart b/lib/pages/mh_page/bluetooth.dart index 7f0ab28..eb00614 100644 --- a/lib/pages/mh_page/bluetooth.dart +++ b/lib/pages/mh_page/bluetooth.dart @@ -6,16 +6,12 @@ import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/component/tool/ClickableContainer.dart'; -class BluetoothPage extends StatefulWidget { - BluetoothPage({super.key}); +class BluetoothPage extends GetView { + Map data; + BluetoothPage({required this.data}); - @override - State createState() => _BluetoothState(); -} + BoxConstraints? bodysize; -BoxConstraints? bodysize; - -class _BluetoothState extends State { @override Widget build(BuildContext context) { return LayoutBuilder(builder: (context, cc) { @@ -74,11 +70,13 @@ class _BluetoothState extends State { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text('TomFayer', - style: TextStyle( - color: Colors.white, - fontSize: 40.rpx, - )), + Text( + data['name']?.toString() ?? '未命名', + style: TextStyle( + color: Colors.white, + fontSize: 40.rpx, + ), + ), SizedBox(width: 27.rpx), ClickableContainer( backgroundColor: Colors.transparent, @@ -130,9 +128,11 @@ class _BluetoothState extends State { padding: EdgeInsets.symmetric(horizontal: 30.rpx), children: [ _buildMenuButton( - context, '详情', "/devicePeopleInfo"), + context, '详情', "/devicePeopleInfo", + arguments: data), _buildMenuButton( - context, '人员资料', "/peopleInfoPage"), + context, '人员资料', "/peopleInfoPage", + arguments: data), _buildMenuButton( context, '房间选择', "/roomPickerPage"), _buildMenuButton( @@ -157,16 +157,21 @@ class _BluetoothState extends State { }); } - Widget _buildMenuButton(BuildContext context, String title, String? path) { + Widget _buildMenuButton(BuildContext context, String title, String? path, + {Map? arguments}) { return Padding( - padding: EdgeInsets.only(bottom: 19.rpx), // 将 margin 外移 + padding: EdgeInsets.only(bottom: 19.rpx), child: ClickableContainer( backgroundColor: Colors.transparent, highlightColor: Color(0XFF055466), padding: EdgeInsets.only(left: 0), onTap: () { if (path?.isNotEmpty == true) { - Get.toNamed(path!); + if (arguments != null) { + Get.toNamed(path!, arguments: arguments); + } else { + Get.toNamed(path!); + } } }, child: Container( diff --git a/lib/pages/mh_page/book_info_page.dart b/lib/pages/mh_page/book_info_page.dart index f53ebfa..8ae1242 100644 --- a/lib/pages/mh_page/book_info_page.dart +++ b/lib/pages/mh_page/book_info_page.dart @@ -616,67 +616,67 @@ class BookInfoPage extends GetView { }).catchError((d) { showToast("预约失败"); }); - Get.toNamed("/bookSuccessPage", arguments: { - "data": { - "id": "7fbfbd614ef5befa3d8a84730f666853", - "code": "10000114", - "orderSn": "2025051411302980610000114", - "userId": "09db8134288e8fb716c7acfdcca9f763", - "extUserId": null, - "deptId": 35, - "storeId": "962df2043ba06c99e6490616b37a60d4", - "customerId": "531ba6efe42d5e2cc3c8f219ebed4cee", - "idCard": null, - "realName": "江有龙", - "userPhone": "18956025450", - "province": "", - "city": "", - "district": "", - "addressDetail": "", - "bookType": 2, - "bookDateId": 104167, - "bookRoomNo": null, - "bookTimeStart": 1747281600000, - "bookTimeEnd": 1747303200000, - "payAmount": 0, - "transactionId": null, - "paid": 0, - "payTime": null, - "payType": null, - "status": 2, - "isVerify": false, - "verifyAdminId": null, - "verifyTime": null, - "giftAdminId": null, - "giftTime": null, - "createTime": 1747193430000, - "refundTime": null, - "isDel": false, - "audienceId": null, - "store": { - "id": "962df2043ba06c99e6490616b37a60d4", - "code": "55102", - "name": "合肥眠花糖共享会议华润大厦B座", - "deptId": 35, - "kingdeeId": "" - }, - "dateStr": "2025年05月15日周四", - "timeStr": "12:00~18:00", - "qrCode": "", - "payName": "未付款", - "statusName": "待体验", - "user": { - "id": "09db8134288e8fb716c7acfdcca9f763", - "nickName": "生陌", - "avatar": null, - "mobile": "18956025450" - }, - "verifyAdmin": null, - "giftAdmin": null, - "storeName": "合肥眠花糖共享会议华润大厦B座", - "storeAddress": null - }, - }); + // Get.toNamed("/bookSuccessPage", arguments: { + // "data": { + // "id": "7fbfbd614ef5befa3d8a84730f666853", + // "code": "10000114", + // "orderSn": "2025051411302980610000114", + // "userId": "09db8134288e8fb716c7acfdcca9f763", + // "extUserId": null, + // "deptId": 35, + // "storeId": "962df2043ba06c99e6490616b37a60d4", + // "customerId": "531ba6efe42d5e2cc3c8f219ebed4cee", + // "idCard": null, + // "realName": "江有龙", + // "userPhone": "18956025450", + // "province": "", + // "city": "", + // "district": "", + // "addressDetail": "", + // "bookType": 2, + // "bookDateId": 104167, + // "bookRoomNo": null, + // "bookTimeStart": 1747281600000, + // "bookTimeEnd": 1747303200000, + // "payAmount": 0, + // "transactionId": null, + // "paid": 0, + // "payTime": null, + // "payType": null, + // "status": 2, + // "isVerify": false, + // "verifyAdminId": null, + // "verifyTime": null, + // "giftAdminId": null, + // "giftTime": null, + // "createTime": 1747193430000, + // "refundTime": null, + // "isDel": false, + // "audienceId": null, + // "store": { + // "id": "962df2043ba06c99e6490616b37a60d4", + // "code": "55102", + // "name": "合肥眠花糖共享会议华润大厦B座", + // "deptId": 35, + // "kingdeeId": "" + // }, + // "dateStr": "2025年05月15日周四", + // "timeStr": "12:00~18:00", + // "qrCode": "", + // "payName": "未付款", + // "statusName": "待体验", + // "user": { + // "id": "09db8134288e8fb716c7acfdcca9f763", + // "nickName": "生陌", + // "avatar": null, + // "mobile": "18956025450" + // }, + // "verifyAdmin": null, + // "giftAdmin": null, + // "storeName": "合肥眠花糖共享会议华润大厦B座", + // "storeAddress": null + // }, + // }); }, colors: const [ Color(0xFFFCFCFC), diff --git a/lib/pages/mh_page/device/device.dart b/lib/pages/mh_page/device/device.dart index 3e102b1..1acc0d8 100644 --- a/lib/pages/mh_page/device/device.dart +++ b/lib/pages/mh_page/device/device.dart @@ -279,7 +279,7 @@ class DeviceInfoWidget extends GetView { mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.start, children: [ - if (device['type'] == 1) + if (device['bind_type'] == 1) Text( '已分享:', style: FlutterFlowTheme.of(context) @@ -289,32 +289,32 @@ class DeviceInfoWidget extends GetView { fontSize: AppFontsize .normal_text_size, letterSpacing: 0, - color: Color(0xFF333333), + color: Colors.white, ), ), - if (device['type'] == 1) + if (device['bind_type'] == 1) Padding( padding: EdgeInsetsDirectional.fromSTEB( 5, 0, 5, 0), child: Text( - // '0', - deviceListController - .model.deviceList[index] - ['shareNum'] ?? - '0', + (deviceListController.model + .deviceList[index] + ['shareNum'] ?? + 0) + .toString(), style: FlutterFlowTheme.of(context) .bodyMedium .override( fontFamily: 'Readex Pro', - color: Color(0xFFE55E92), + color: Color(0xFF85F5FF), fontSize: AppFontsize .normal_text_size, letterSpacing: 0, ), ), ), - if (device['type'] == 1) + if (device['bind_type'] == 1) Text( '人', style: FlutterFlowTheme.of(context) @@ -324,10 +324,10 @@ class DeviceInfoWidget extends GetView { fontSize: AppFontsize .normal_text_size, letterSpacing: 0, - color: Color(0xFF333333), + color: Colors.white, ), ), - if (device['type'] == 2) + if (device['bind_type'] == 2) Text( '来自', style: FlutterFlowTheme.of(context) @@ -337,10 +337,10 @@ class DeviceInfoWidget extends GetView { fontSize: AppFontsize .normal_text_size, letterSpacing: 0, - color: Color(0xFF333333), + color: Colors.white, ), ), - if (device['type'] == 2) + if (device['bind_type'] == 2) Padding( padding: EdgeInsetsDirectional.fromSTEB( @@ -351,14 +351,14 @@ class DeviceInfoWidget extends GetView { .bodyMedium .override( fontFamily: 'Readex Pro', - color: Color(0xFFE55E92), + color: Color(0xFF85F5FF), fontSize: AppFontsize .normal_text_size, letterSpacing: 0, ), ), ), - if (device['type'] == 2) + if (device['bind_type'] == 2) Text( '的分享', style: FlutterFlowTheme.of(context) @@ -367,7 +367,7 @@ class DeviceInfoWidget extends GetView { fontFamily: 'Readex Pro', fontSize: 21.rpx, letterSpacing: 0, - color: Color(0xFF333333), + color: Colors.white, ), ), ], diff --git a/lib/pages/mh_page/device_people_info.dart b/lib/pages/mh_page/device_people_info.dart index 99d2cdc..ea504cb 100644 --- a/lib/pages/mh_page/device_people_info.dart +++ b/lib/pages/mh_page/device_people_info.dart @@ -1,18 +1,40 @@ import 'package:ef/ef.dart'; import 'package:flutter/material.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart'; +import 'package:vbvs_app/common/color/ServiceConstant.dart'; import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/MyUtils.dart'; -import 'package:vbvs_app/component/base/THFlutterFlowDropDown.dart'; +import 'package:vbvs_app/common/util/requestWithLog.dart'; import 'package:vbvs_app/component/tool/ClickableContainer.dart'; import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; -class DevicePeopleInfo extends StatelessWidget { - DevicePeopleInfo({super.key}); +class DevicePeopleInfo extends GetView { + Map data; + DevicePeopleInfo({required this.data}); - get glController => Get.find(); - get bodyData => glController.model.mainDevicePeople; + // get glController => Get.find(); + // get bodyData => glController.model.mainDevicePeople; + RxList peopleList = [].obs; + Future devicePeopleInfo() async { + String serviceAddress = ServiceConstant.service_address; + String serviceName = ServiceConstant.server_service; + String serviceApi = ServiceConstant.person_info; + String queryUrl = + "$serviceAddress$serviceName$serviceApi?mac=${data["mac"]}"; + + requestWithLog( + logTitle: "获取设备的人员信息列表", + method: MyHttpMethod.get, + queryUrl: queryUrl, + onSuccess: (res) { + if (res.data != null && res.data is List) { + peopleList.assignAll(res.data); + print("peopleList: $peopleList"); + } + }, + ); + } getInfoRow(context, String str) { return Container( @@ -34,6 +56,11 @@ class DevicePeopleInfo extends StatelessWidget { @override Widget build(BuildContext context) { + WidgetsBinding.instance.addPostFrameCallback((_) { + if (data["device_type"] == 1 && peopleList.isEmpty) { + devicePeopleInfo(); + } + }); return LayoutBuilder( builder: (context, boxConstraints) => GestureDetector( onTap: () => FocusScope.of(context).unfocus(), @@ -104,8 +131,8 @@ class DevicePeopleInfo extends StatelessWidget { mainAxisSize: MainAxisSize.max, children: [ ClickableContainer( - backgroundColor: Color(0xFF003058), - highlightColor: Color(0xFF036060), + backgroundColor: Color(0xFFFF036060), + highlightColor: Colors.transparent, borderRadius: 16.rpx, padding: EdgeInsets.fromLTRB( 30.rpx, 20.rpx, 0, 20.rpx), @@ -130,127 +157,74 @@ class DevicePeopleInfo extends StatelessWidget { ), ), ), + getInfoRow( + context, "名称:${data["name"] ?? "-"}"), getInfoRow(context, - "名称:${glController.getDeviceGroupName2(glController.model.deviceMain)}"), - getInfoRow(context, - "房间:${glController.model.deviceMain["roomName"] ?? "-"}"), - getInfoRow(context, - "网络:${glController.model.deviceMain["status"] ?? "-"}"), - getInfoRow(context, - "MAC:${glController.model.deviceMain["mac"] ?? "-"}"), + "房间:${data["roomName"] ?? "-"}"), + getInfoRow( + context, + "网络:${data["status"]?["status"] == 1 ? "在线" : data["status"]?["status"] == 0 ? "不在线" : "-"}", + ), + getInfoRow( + context, "MAC:${data["mac"] ?? "-"}"), ], ), )), - ...List.generate( - "${glController.model.deviceMain["bindMacB"]}" - .length > - 6 - ? 2 - : 1, (index) { - String location_ = ""; - if ("${glController.model.deviceMain["bindMacB"]}" - .length > - 6 && - (glController.model.mainDevicePeople[0] - ?["direction"] == - 1 || - glController.model.mainDevicePeople[1] - ?["direction"] == - 1)) { - location_ = - "${glController.model.mainDevicePeople[index]?["direction"] == 1 ? '左侧' : '右侧'}"; - } - // return Container( - // decoration: BoxDecoration( - // color: Color(0xFF003058), - // borderRadius: BorderRadius.circular(16.rpx), - // ), - // child: Padding( - // padding: EdgeInsets.symmetric( - // horizontal: 30.rpx), - // child: Column( - // children: [ - // Container( - // width: double.infinity, - // margin: EdgeInsets.only( - // bottom: 30.rpx, top: 50.rpx), - // decoration: BoxDecoration(), - // child: Text( - // '人员资料${index == 0 ? "A" : "B"}', - // style: FlutterFlowTheme.of(context) - // .bodyMedium - // .override( - // fontFamily: 'Readex Pro', - // color: Colors.white, - // fontSize: 32.rpx, - // letterSpacing: 0, - // ), - // ), - // ), - // if (location_.isNotEmpty) - // getInfoRow( - // context, "校准位置:$location_"), - // getInfoRow(context, - // "姓名:${bodyData[index]["name"] ?? "-"}"), - // getInfoRow(context, - // "性别:${bodyData[index]["gender"] == null ? "-" : (bodyData[index]["gender"] == 1 ? "男" : "女")}"), - // getInfoRow(context, - // "身高:${bodyData[index]["height"] == null ? "-" : "${bodyData[index]["height"]}cm"}"), - // getInfoRow(context, - // "体重:${bodyData[index]["weight"] == null ? "-" : "${bodyData[index]["weight"]}kg"}"), - // getInfoRow(context, - // "生日:${bodyData[index]["birthday"] == null ? "-" : (time_08_Formatter_pattern(bodyData[index]["birthday"], "yyyy年MM月dd日"))}"), - // getInfoRow(context, - // "电话:${bodyData[index]["tel"] ?? "-"}"), - // getInfoRow(context, - // "紧急联系人:${bodyData[index]["contact"] ?? "-"}"), - // ], - // ))); + if (data["device_type"] == 1 && peopleList.isNotEmpty) + ...List.generate(peopleList.length, (index) { + final person = peopleList[index]; + String location_ = ''; + if ("${data["bindMacB"]}".length > 6 && + (person["direction"] == 1 || + person["direction"] == 2)) { + location_ = + person["direction"] == 1 ? '左侧' : '右侧'; + } - return ClickableContainer( - backgroundColor: Color(0xFF003058), - highlightColor: Color(0xFF036060), - borderRadius: 16.rpx, - padding: EdgeInsets.fromLTRB( - 30.rpx, 20.rpx, 30.rpx, 20.rpx), - onTap: () {}, - child: Column( - children: [ - Container( - width: double.infinity, - alignment: Alignment.centerLeft, - child: Text( - '人员资料${index == 0 ? "A" : "B"}', - style: FlutterFlowTheme.of(context) - .bodyMedium - .override( - fontFamily: 'Readex Pro', - color: Colors.white, - fontSize: 32.rpx, - letterSpacing: 0, - ), + return ClickableContainer( + backgroundColor: Color(0xFF003058), + highlightColor: Color(0xFF036060), + borderRadius: 16.rpx, + padding: EdgeInsets.fromLTRB( + 30.rpx, 20.rpx, 30.rpx, 20.rpx), + onTap: () {}, + child: Column( + children: [ + Container( + width: double.infinity, + alignment: Alignment.centerLeft, + child: Text( + '人员资料${index == 0 ? "A" : "B"}', + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Readex Pro', + color: Colors.white, + fontSize: 32.rpx, + letterSpacing: 0, + ), + ), ), - ), - if (location_.isNotEmpty) - getInfoRow(context, "校准位置:$location_"), - getInfoRow(context, - "姓名:${bodyData[index]["name"] ?? "-"}"), - getInfoRow(context, - "性别:${bodyData[index]["gender"] == null ? "-" : (bodyData[index]["gender"] == 1 ? "男" : "女")}"), - getInfoRow(context, - "身高:${bodyData[index]["height"] == null ? "-" : "${bodyData[index]["height"]}cm"}"), - getInfoRow(context, - "体重:${bodyData[index]["weight"] == null ? "-" : "${bodyData[index]["weight"]}kg"}"), - getInfoRow(context, - "生日:${bodyData[index]["birthday"] == null ? "-" : (time_08_Formatter_pattern(bodyData[index]["birthday"], "yyyy年MM月dd日"))}"), - getInfoRow(context, - "电话:${bodyData[index]["tel"] ?? "-"}"), - getInfoRow(context, - "紧急联系人:${bodyData[index]["contact"] ?? "-"}"), - ], - ), - ); - }) + if (location_.isNotEmpty) + getInfoRow(context, "校准位置:$location_"), + getInfoRow( + context, "姓名:${person["name"] ?? "-"}"), + getInfoRow(context, + "性别:${person["gender"] == null ? "-" : (person["gender"] == 1 ? "男" : "女")}"), + getInfoRow(context, + "身高:${person["height"] == null ? "-" : "${person["height"]}cm"}"), + getInfoRow(context, + "体重:${person["weight"] == null ? "-" : "${person["weight"]}kg"}"), + getInfoRow(context, + "生日:${person["birthday"] == null ? "-" : time_08_Formatter_pattern(person["birthday"], "yyyy年MM月dd日")}"), + getInfoRow( + context, "电话:${person["tel"] ?? "-"}"), + getInfoRow(context, + "紧急联系人:${person["contact"] ?? "-"}"), + ], + ), + ); + }) ].divide(SizedBox( height: 25.rpx, )), diff --git a/lib/pages/mh_page/experience_store_page.dart b/lib/pages/mh_page/experience_store_page.dart index 1a561c7..26f1fdc 100644 --- a/lib/pages/mh_page/experience_store_page.dart +++ b/lib/pages/mh_page/experience_store_page.dart @@ -58,281 +58,6 @@ class _ExperienceStorePageState extends State { @override Widget build(BuildContext context) { return LayoutBuilder(builder: (context, cc) { - // controller.model.experienceStoreModelList = [ - // { - // "id": "5b82d1d9c33c74647e7624ec1db7918f", - // "enabled": true, - // "code": "3401002", - // "name": "SWES眠花糖合肥省委大院体验店", - // "customerId": null, - // "setNetCustomerKid": null, - // "customer": null, - // "kingdeeId": "", - // "channel": null, - // "salePersonId": "ed648f977422a9f32a05b4892a3cb529", - // "salePerson": null, - // "deptId": 3, - // "deptName": null, - // "dept": null, - // "introduction": "", - // "mobile": "18156022846", - // "hotline": "0551-64464894", - // "city": "合肥市", - // "district": "庐阳区", - // "addressDetail": "合肥市庐阳区逍遥津街道南含山路与红星路交汇处", - // "image": "", - // "latitude": "31.858934", - // "longitude": "117.282166", - // "isDel": false, - // "isAppShow": true, - // "business": true, - // "authEndTime": null, - // "createTime": 1701133326000, - // "createAdminId": "f6da6faa2d50e7eff7b54bcdd55b0283", - // "updateTime": 1709193588000, - // "updateAdminId": null, - // "distance": 2.2 - // }, - // { - // "id": "97603deebb83f610f73acf5d0def2bce", - // "enabled": true, - // "code": "3401003", - // "name": "SWES眠花糖合肥安粮国贸体验店", - // "customerId": null, - // "setNetCustomerKid": null, - // "customer": null, - // "kingdeeId": "", - // "channel": null, - // "salePersonId": "69297c65588adde4ee5de3c43a2c4033", - // "salePerson": null, - // "deptId": 3, - // "deptName": null, - // "dept": null, - // "introduction": "", - // "mobile": "18655643429", - // "hotline": "0551-65156985", - // "city": "合肥市", - // "district": "政务新区", - // "addressDetail": "安徽省合肥市蜀山区合作化南路16号", - // "image": "", - // "latitude": "31.82018", - // "longitude": "117.25367", - // "isDel": false, - // "isAppShow": true, - // "business": true, - // "authEndTime": null, - // "createTime": 1701133473000, - // "createAdminId": "f6da6faa2d50e7eff7b54bcdd55b0283", - // "updateTime": 1709193752000, - // "updateAdminId": null, - // "distance": 3.5 - // }, - // { - // "id": "b6b588d7ff6b248115ee3e5951cf39a1", - // "enabled": true, - // "code": "3301001", - // "name": "SWES眠花糖杭州南星桥旗舰店", - // "customerId": null, - // "setNetCustomerKid": null, - // "customer": null, - // "kingdeeId": "", - // "channel": null, - // "salePersonId": "f3a5e7935f65e94bc5aa6b2d63211e61", - // "salePerson": null, - // "deptId": 33, - // "deptName": null, - // "dept": null, - // "introduction": "", - // "mobile": "15222919097", - // "hotline": "0571-86718606", - // "city": "杭州市", - // "district": "上城区", - // "addressDetail": "浙江省杭州市上城区飞云江路45号一层102室", - // "image": "", - // "latitude": "30.21667", - // "longitude": "120.17757", - // "isDel": false, - // "isAppShow": true, - // "business": true, - // "authEndTime": null, - // "createTime": 1701135379000, - // "createAdminId": "f6da6faa2d50e7eff7b54bcdd55b0283", - // "updateTime": 1709194185000, - // "updateAdminId": null, - // "distance": 332.1 - // }, - // { - // "id": "38fdbb715dc7bfddae3e32685c288e49", - // "enabled": true, - // "code": "3102001", - // "name": "SWES眠花糖上海复兴荟旗舰店", - // "customerId": null, - // "setNetCustomerKid": null, - // "customer": null, - // "kingdeeId": "", - // "channel": null, - // "salePersonId": "4ae944badb423197bc54c0a6ec252944", - // "salePerson": null, - // "deptId": 32, - // "deptName": null, - // "dept": null, - // "introduction": "", - // "mobile": "13053037959", - // "hotline": "021-63391962", - // "city": "上海市", - // "district": "黄浦区", - // "addressDetail": "上海市黄浦区复兴东路1108号1层-1室", - // "image": "", - // "latitude": "31.22209", - // "longitude": "121.494667", - // "isDel": false, - // "isAppShow": true, - // "business": true, - // "authEndTime": null, - // "createTime": 1701135192000, - // "createAdminId": "f6da6faa2d50e7eff7b54bcdd55b0283", - // "updateTime": 1709194151000, - // "updateAdminId": null, - // "distance": 407.3 - // }, - // { - // "id": "af908e6c5d1a2c8113b1c73117e15064", - // "enabled": true, - // "code": "3101001", - // "name": "SWES眠花糖上海外滩九里体验店", - // "customerId": null, - // "setNetCustomerKid": null, - // "customer": null, - // "kingdeeId": "", - // "channel": null, - // "salePersonId": "1794f729f27ad4a44afad10061446dd5", - // "salePerson": null, - // "deptId": 31, - // "deptName": null, - // "dept": null, - // "introduction": "", - // "mobile": "13856414205", - // "hotline": "021-63391208", - // "city": "上海市", - // "district": "黄浦区", - // "addressDetail": "上海市黄浦区紫霞路103-107号1层103-12室", - // "image": "", - // "latitude": "31.218434", - // "longitude": "121.502098", - // "isDel": false, - // "isAppShow": true, - // "business": true, - // "authEndTime": null, - // "createTime": 1701134886000, - // "createAdminId": "f6da6faa2d50e7eff7b54bcdd55b0283", - // "updateTime": 1709194053000, - // "updateAdminId": null, - // "distance": 408.1 - // }, - // { - // "id": "a5f1fc9a03ba827841c473e28a3fcdb2", - // "enabled": true, - // "code": "3101002", - // "name": "SWES眠花糖上海尚悦湾旗舰店", - // "customerId": null, - // "setNetCustomerKid": null, - // "customer": null, - // "kingdeeId": "", - // "channel": null, - // "salePersonId": "d97ec48ee3b1060eb7ff5c81f0ffa37f", - // "salePerson": null, - // "deptId": 31, - // "deptName": null, - // "dept": null, - // "introduction": "", - // "mobile": "19523660595", - // "hotline": "021-63336707", - // "city": "上海市", - // "district": "浦东新区", - // "addressDetail": "上海市浦东新区银城路66号", - // "image": "", - // "latitude": "31.24103", - // "longitude": "121.51045", - // "isDel": false, - // "isAppShow": true, - // "business": true, - // "authEndTime": null, - // "createTime": 1701135694000, - // "createAdminId": "f6da6faa2d50e7eff7b54bcdd55b0283", - // "updateTime": 1709194087000, - // "updateAdminId": null, - // "distance": 408.4 - // }, - // { - // "id": "21ddfb547060e930f841605dc4469bec", - // "enabled": true, - // "code": "1101001", - // "name": "SWES眠花糖北京富力城旗舰店", - // "customerId": null, - // "setNetCustomerKid": null, - // "customer": null, - // "kingdeeId": "", - // "channel": null, - // "salePersonId": "b66028a628ce0fcb871ab7db5c17128e", - // "salePerson": null, - // "deptId": 11, - // "deptName": null, - // "dept": null, - // "introduction": "", - // "mobile": "15556119960", - // "hotline": "010-58766288", - // "city": "北京市", - // "district": "朝阳区", - // "addressDetail": "北京市朝阳区天力街3号楼1至2层商业12号", - // "image": "", - // "latitude": "39.89862", - // "longitude": "116.45851", - // "isDel": false, - // "isAppShow": false, - // "business": true, - // "authEndTime": null, - // "createTime": 1701134049000, - // "createAdminId": "f6da6faa2d50e7eff7b54bcdd55b0283", - // "updateTime": 1733193484000, - // "updateAdminId": null, - // "distance": 897.7 - // }, - // { - // "id": "432bfdf508115827c5dca474b72dea68", - // "enabled": true, - // "code": "1102001", - // "name": "SWES眠花糖北京英皇中心旗舰店", - // "customerId": null, - // "setNetCustomerKid": null, - // "customer": null, - // "kingdeeId": "", - // "channel": null, - // "salePersonId": "155848302d5b6f2768111574f0161816", - // "salePerson": null, - // "deptId": 12, - // "deptName": null, - // "dept": null, - // "introduction": "", - // "mobile": "18225602774", - // "hotline": "010-53269059", - // "city": "北京市", - // "district": "朝阳区", - // "addressDetail": "北京市朝阳区建国门外大街丁12号", - // "image": "", - // "latitude": "39.907911", - // "longitude": "116.444584", - // "isDel": false, - // "isAppShow": true, - // "business": true, - // "authEndTime": null, - // "createTime": 1701134158000, - // "createAdminId": "f6da6faa2d50e7eff7b54bcdd55b0283", - // "updateTime": 1710490644000, - // "updateAdminId": null, - // "distance": 898.9 - // } - // ]; - bodysize = cc; return GestureDetector( diff --git a/lib/pages/user/setting_page.dart b/lib/pages/user/setting_page.dart index d3cab69..720ae7e 100644 --- a/lib/pages/user/setting_page.dart +++ b/lib/pages/user/setting_page.dart @@ -329,7 +329,7 @@ class _SettingPageState extends State { mainAxisSize: MainAxisSize.max, children: [ Text( - '设置页.关于我们'.tr, + '关于我们'.tr, style: FlutterFlowTheme.of(context) .bodyMedium @@ -381,7 +381,7 @@ class _SettingPageState extends State { mainAxisSize: MainAxisSize.max, children: [ Text( - '设置页.用户协议'.tr, + '用户协议'.tr, style: FlutterFlowTheme.of(context) .bodyMedium @@ -433,7 +433,7 @@ class _SettingPageState extends State { mainAxisSize: MainAxisSize.max, children: [ Text( - '设置页.隐私协议'.tr, + '隐私协议'.tr, style: FlutterFlowTheme.of(context) .bodyMedium @@ -506,7 +506,7 @@ class _SettingPageState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - '设置页.退出登录'.tr, + '退出登录'.tr, style: FlutterFlowTheme.of(context) .bodyMedium .override( @@ -553,7 +553,7 @@ class _SettingPageState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - '设置页.注销账号'.tr, + '注销账号'.tr, style: FlutterFlowTheme.of(context) .bodyMedium .override( diff --git a/lib/routers/mh_routers.dart b/lib/routers/mh_routers.dart index 22e7a4d..424d456 100644 --- a/lib/routers/mh_routers.dart +++ b/lib/routers/mh_routers.dart @@ -51,15 +51,17 @@ var mhroutes = { "/addressListPage": (contxt) => AddressListPage(), "/editAddressPage": (contxt) => EditAddressPage(), "/languagePage": (context) => LanguagePage(), - '/bluetoothPage': (context) => BluetoothPage(), - "/devicePeopleInfo": (context) => DevicePeopleInfo(), + '/bluetoothPage': (context, {arguments}) => BluetoothPage(data: arguments), + "/devicePeopleInfo": (context, {arguments}) => + DevicePeopleInfo(data: arguments), "/sleepHabitPage": (context) => SleepHabitPage(), '/syms': (context) => Smys(), "/applyRepairPage": (context) => ApplyRepairPage(), "/roomPickerPage": (context) => RoomPickerPage(), "/editBedPage": (context) => EditBedPage(), "/experienceStorePage": (context) => ExperienceStorePage(), - "/bookInfoPage": (context, {arguments}) => BookInfoPage(data: arguments["data"]), + "/bookInfoPage": (context, {arguments}) => + BookInfoPage(data: arguments["data"]), "/bookSuccessPage": (contxt, {arguments}) => BookSuccessPage(data: arguments["data"]), "/myExperiencePage": (context) => MyExperiencePage(),