更新
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user