更新界面布局
This commit is contained in:
@@ -953,6 +953,8 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
|
||||
deviceCalibrationController.flag.value = 0; // 重置标志允许再次点击
|
||||
} else if (isSecondStep && per >= 100 && currStep == 5 && status) {
|
||||
// 第二步完成
|
||||
updateDeviceBindStatus(
|
||||
blueteethBindController.currentDeviceMac!.value);
|
||||
_pollingTimer?.cancel();
|
||||
TopSlideNotification.show(context, text: "设备校准完成".tr);
|
||||
deviceCalibrationController.bed_calibration.value = 1;
|
||||
@@ -1024,4 +1026,38 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
|
||||
|
||||
return Container();
|
||||
}
|
||||
|
||||
void updateDeviceBindStatus(String mac) {
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.user_setting;
|
||||
String type = "device_bind_status_$mac";
|
||||
String queryUrl =
|
||||
"${serviceAddress}${serviceName}${serviceApi}?type=${type}";
|
||||
requestWithLog(
|
||||
logTitle: "查询绑定流程",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
print(res);
|
||||
Map<String, dynamic> data = {
|
||||
"type": type,
|
||||
"mac": mac,
|
||||
"wifi": res.data['wifi'],
|
||||
"celibration": true,
|
||||
"person_info": res.data['person_info'],
|
||||
"time": DateTime.now().millisecondsSinceEpoch,
|
||||
};
|
||||
requestWithLog(
|
||||
logTitle: "更新绑定流程",
|
||||
method: MyHttpMethod.put,
|
||||
queryUrl: queryUrl,
|
||||
data: data,
|
||||
onSuccess: (res) {},
|
||||
onFailure: (res) {},
|
||||
);
|
||||
},
|
||||
onFailure: (res) {},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user