修复眠花糖设置闹钟无效
This commit is contained in:
@@ -24,6 +24,7 @@ import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/model/BleDeviceData.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/blueteeth_device_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/component/mht_bind_dialog.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
|
||||
import 'package:EasyDartModule/EasyDartModule.dart' as edm;
|
||||
|
||||
@@ -39,6 +40,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
||||
GlobalController globalController = Get.find();
|
||||
UserInfoController userInfoController = Get.find();
|
||||
BlueteethBindController blueteethBindController = Get.find();
|
||||
MHTBlueToothController mhtBlueToothController = Get.find();
|
||||
PersonController personController = Get.find();
|
||||
ThemeController themeController = Get.find();
|
||||
var lisObj;
|
||||
@@ -226,6 +228,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
||||
onBack: () {
|
||||
// Get.offAllNamed('/mHTBlueteethDevicePage',
|
||||
// arguments: widget.deviceInfo.type);
|
||||
blueteethBindController.currentDevice?.disconnect();
|
||||
Get.back();
|
||||
},
|
||||
),
|
||||
@@ -928,6 +931,14 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
||||
}
|
||||
} else {
|
||||
wifiStatus = false;
|
||||
if (needSuccess) {
|
||||
haveSuccess = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "配网失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
}
|
||||
}
|
||||
blueteethBindController.wifiStatus.value = wifiStatus ? 1 : 0;
|
||||
} catch (e) {
|
||||
@@ -1348,6 +1359,9 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
||||
await blueteethBindController.currentDevice!.disconnect();
|
||||
// blueteethBindController.currentDevice = null;
|
||||
}
|
||||
if (mhtBlueToothController.currentDevice != null) {
|
||||
await mhtBlueToothController.currentDevice!.disconnect();
|
||||
}
|
||||
DailyLogUtils.writeLog("关闭蓝牙连接成功".tr);
|
||||
} catch (e) {
|
||||
DailyLogUtils.writeError("关闭蓝牙连接失败: $e");
|
||||
|
||||
Reference in New Issue
Block a user