更新界面布局
This commit is contained in:
@@ -156,11 +156,11 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
child: Container(
|
||||
width: 130.rpx,
|
||||
width: 140.rpx,
|
||||
height: 60.rpx,
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0, 0.rpx, 0),
|
||||
16.rpx, 0, 16.rpx, 0),
|
||||
child: Text(
|
||||
'下一步'.tr,
|
||||
style: TextStyle(
|
||||
@@ -959,6 +959,8 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
deviceCalibrationController.flag.value = 2;
|
||||
progressNotifier.value = 0; // 重置进度条
|
||||
failureNotifier.value = false; // 重置失败状态
|
||||
updateDeviceBindStatus(
|
||||
blueteethBindController.currentDeviceMac!.value);
|
||||
}
|
||||
},
|
||||
onFailure: (res) {
|
||||
@@ -1022,4 +1024,39 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
|
||||
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": false,
|
||||
"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