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