This commit is contained in:
wyf
2025-06-17 08:57:06 +08:00
parent 89d0bbcc00
commit d26a4797c3
6 changed files with 714 additions and 37 deletions

View File

@@ -71,6 +71,8 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
RxMap connect_wifi = {}.obs;
RxString? cid = "".obs;
void startStatusPolling() {
updateDeviceStatus().then((res) {
if (res.code == HttpStatusCodes.ok) {
@@ -226,11 +228,17 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
ApiResponse res =
ApiResponse.fromJson(responseData, (object) => object);
MyUtils.formatResponse(res, "绑定成功".tr, "绑定成功".tr);
if (res.code == HttpStatusCodes.ok) {
// PersonController personController = Get.find();
// personController.currentPersonId.value = res.data['id'];
//todo 绑定成功需要返回传感器id
currentDeviceMac.value = "";
if(res.data!=null){
if(currentFullDevice!=null){
currentFullDevice!.macAID = res.data['macA'];
currentFullDevice!.macBID = res.data['macB'];
}
}
return res;
} else {
return res;