解绑删除弹窗
This commit is contained in:
@@ -234,6 +234,29 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
obsData['bind_type'] == 1 ? '解绑' : '删除',
|
obsData['bind_type'] == 1 ? '解绑' : '删除',
|
||||||
"",
|
"",
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
// await deviceListController
|
||||||
|
// .unbindDevice(obsData);
|
||||||
|
// await deviceListController
|
||||||
|
// .getDeviceList();
|
||||||
|
|
||||||
|
// MHTHomeController homeController =
|
||||||
|
// Get.find();
|
||||||
|
// homeController.selectDevcie.value = "";
|
||||||
|
// try {
|
||||||
|
// WebviewTestController
|
||||||
|
// webviewTestController = Get.find();
|
||||||
|
// webviewTestController.web.jsbridge?.dart
|
||||||
|
// .unBindDevice();
|
||||||
|
// } catch (e) {
|
||||||
|
// ef.log("[h5]通知列表更新报错:$e");
|
||||||
|
// }
|
||||||
|
// Get.toNamed("/mianPageBottomChange");
|
||||||
|
if (obsData['bind_type'] == 1) {
|
||||||
|
// 解绑弹窗
|
||||||
|
showUnbindConfirmDialog(
|
||||||
|
context: context,
|
||||||
|
title: "是否进行解绑?",
|
||||||
|
onConfirm: () async {
|
||||||
await deviceListController
|
await deviceListController
|
||||||
.unbindDevice(obsData);
|
.unbindDevice(obsData);
|
||||||
await deviceListController
|
await deviceListController
|
||||||
@@ -241,16 +264,46 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
|
|
||||||
MHTHomeController homeController =
|
MHTHomeController homeController =
|
||||||
Get.find();
|
Get.find();
|
||||||
homeController.selectDevcie.value = "";
|
homeController.selectDevcie.value =
|
||||||
|
"";
|
||||||
try {
|
try {
|
||||||
WebviewTestController
|
WebviewTestController
|
||||||
webviewTestController = Get.find();
|
webviewTestController =
|
||||||
webviewTestController.web.jsbridge?.dart
|
Get.find();
|
||||||
|
webviewTestController
|
||||||
|
.web.jsbridge?.dart
|
||||||
.unBindDevice();
|
.unBindDevice();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ef.log("[h5]通知列表更新报错:$e");
|
ef.log("[h5]通知列表更新报错:$e");
|
||||||
}
|
}
|
||||||
Get.toNamed("/mianPageBottomChange");
|
Get.toNamed(
|
||||||
|
"/mianPageBottomChange");
|
||||||
|
// 执行解绑逻辑
|
||||||
|
},
|
||||||
|
onCancel: () {
|
||||||
|
// 点击取消后的逻辑
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else if (obsData['bind_type'] == 2) {
|
||||||
|
// 删除弹窗
|
||||||
|
showDeleteDeviceConfirmDialog(
|
||||||
|
context: context,
|
||||||
|
title: "是否进行删除?",
|
||||||
|
onConfirm: () async {
|
||||||
|
await deviceListController
|
||||||
|
.unbindDevice(
|
||||||
|
obsData,
|
||||||
|
);
|
||||||
|
await deviceListController
|
||||||
|
.getDeviceList();
|
||||||
|
Get.toNamed(
|
||||||
|
"/mianPageBottomChange");
|
||||||
|
},
|
||||||
|
onCancel: () {
|
||||||
|
// 点击取消后的逻辑
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
|
|||||||
Reference in New Issue
Block a user