Merge remote-tracking branch 'origin/master'
This commit is contained in:
Binary file not shown.
@@ -41,7 +41,7 @@ class PeopleInfoController extends GetControllerEx<PeopleInfoModel> {
|
||||
@override
|
||||
Future<void> onInit() async {
|
||||
super.onInit();
|
||||
await getPeoples(Get.arguments['mac']); // 控制器创建时立即执行
|
||||
// await getPeoples(Get.arguments['mac']); // 控制器创建时立即执行
|
||||
}
|
||||
|
||||
getPeoples(String mac) async {
|
||||
|
||||
@@ -60,7 +60,7 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
|
||||
|
||||
RxDouble textHalfWidth = 0.0.obs;
|
||||
List device_bind_status = [];
|
||||
int device_bind_flag = 0;//0。未初始化 1.已初始化
|
||||
int device_bind_flag = 0; //0。未初始化 1.已初始化
|
||||
|
||||
Future<ApiResponse> uploadImg() async {
|
||||
EasyDartModule.logger.info("请求上传图片");
|
||||
@@ -133,6 +133,10 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
|
||||
apiResponse.msg = "昵称为空".tr;
|
||||
return apiResponse;
|
||||
}
|
||||
if (user.tmpNickName!.length >= 9) {
|
||||
apiResponse.msg = "最长字符为8个字".tr;
|
||||
return apiResponse;
|
||||
}
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.user_info;
|
||||
|
||||
@@ -189,6 +189,7 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
|
||||
return res;
|
||||
} else {
|
||||
model.deviceDataStatus = [];
|
||||
return ApiResponse(code:1, msg: "".tr);
|
||||
}
|
||||
} catch (e) {
|
||||
print("获取设备状态异常: $e");
|
||||
@@ -218,9 +219,9 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
|
||||
"macA": bleDevice.macA,
|
||||
if (bleDevice.macB != null && bleDevice.macB!.isNotEmpty)
|
||||
"macB": bleDevice.macB,
|
||||
if (bleDevice.name!=null && bleDevice.name!.isNotEmpty)
|
||||
'param':{
|
||||
'name':bleDevice.name,
|
||||
if (bleDevice.name != null && bleDevice.name!.isNotEmpty)
|
||||
'param': {
|
||||
'name': bleDevice.name,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -237,8 +238,8 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
|
||||
// personController.currentPersonId.value = res.data['id'];
|
||||
//todo 绑定成功需要返回传感器id
|
||||
currentDeviceMac.value = "";
|
||||
if(res.data!=null){
|
||||
if(currentFullDevice!=null){
|
||||
if (res.data != null) {
|
||||
if (currentFullDevice != null) {
|
||||
currentFullDevice!.macAID = res.data['macA'];
|
||||
currentFullDevice!.macBID = res.data['macB'];
|
||||
}
|
||||
|
||||
@@ -112,6 +112,7 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
|
||||
}
|
||||
|
||||
void _startScanning() async {
|
||||
try {
|
||||
if (!mounted || isScanning || !mhtBlueToothController.shouldScan.value)
|
||||
return;
|
||||
|
||||
@@ -204,6 +205,13 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
ef.log("$e");
|
||||
} finally {
|
||||
setState(() {
|
||||
isScanning = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void _startPeriodicScan() {
|
||||
|
||||
@@ -13,6 +13,7 @@ import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
import 'package:vbvs_app/controller/home/home_controller.dart';
|
||||
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/people_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/person/person_controller.dart';
|
||||
|
||||
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
|
||||
@@ -33,6 +34,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
PeopleInfoController controller = Get.put(PeopleInfoController());
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
getPersonData();
|
||||
return LayoutBuilder(
|
||||
builder: (context, boxConstraints) => GestureDetector(
|
||||
onTap: () {
|
||||
@@ -831,4 +833,9 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
return "-";
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> getPersonData() async {
|
||||
PeopleInfoController peopleInfoController = Get.find();
|
||||
await peopleInfoController.getPeoples(Get.arguments['mac']); // 控制器创建时立即执行
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user