fix:增加锁版未配网的提示

This commit is contained in:
liyi 2025-02-18 14:20:10 +08:00
parent 214ae198d9
commit 9682c558b7
3 changed files with 14 additions and 3 deletions

View File

@ -764,18 +764,17 @@ class LockDetailLogic extends BaseGetXController {
throw Exception('设备peerId为空'); throw Exception('设备peerId为空');
} }
// peerID // peerID
StartChartManage().lockPeerId = peerId;
StartChartManage().lockNetworkInfo = StartChartManage().lockNetworkInfo =
deviceNetworkInfo.data ?? DeviceNetworkInfo(); deviceNetworkInfo.data ?? DeviceNetworkInfo();
StartChartManage().lockPeerId = peerId;
} }
} }
/// ///
void sendMonitorMessage() { void sendMonitorMessage() {
if (StartChartManage().lockNetworkInfo.wifiName == null || if (StartChartManage().lockNetworkInfo.wifiName == null ||
StartChartManage().lockNetworkInfo.wifiName == '') { StartChartManage().lockNetworkInfo.wifiName == '') {
showToast('设备未配网'); showToast('设备未配网'.tr);
return; return;
} }
// id // id

View File

@ -12,6 +12,7 @@ import 'package:star_lock/app_settings/app_settings.dart';
import 'package:star_lock/blue/io_gateway/io_gateway_configuringWifi.dart'; import 'package:star_lock/blue/io_gateway/io_gateway_configuringWifi.dart';
import 'package:star_lock/blue/io_gateway/io_gateway_getStatus.dart'; import 'package:star_lock/blue/io_gateway/io_gateway_getStatus.dart';
import 'package:star_lock/login/login/entity/LoginEntity.dart'; import 'package:star_lock/login/login/entity/LoginEntity.dart';
import 'package:star_lock/main/lockDetail/lockDetail/device_network_info.dart';
import 'package:star_lock/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifiEntity.dart'; import 'package:star_lock/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifiEntity.dart';
import 'package:star_lock/mine/gateway/addGateway/gatewayConfigurationWifi/getGatewayConfiguration_entity.dart'; import 'package:star_lock/mine/gateway/addGateway/gatewayConfigurationWifi/getGatewayConfiguration_entity.dart';
import 'package:star_lock/mine/gateway/addGateway/selectGateway/getGatewayInfo_model.dart'; import 'package:star_lock/mine/gateway/addGateway/selectGateway/getGatewayInfo_model.dart';
@ -60,6 +61,13 @@ class ConfiguringWifiLogic extends BaseGetXController {
showToast('配网成功'.tr, something: () { showToast('配网成功'.tr, something: () {
eventBus eventBus
.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value)); .fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
// peerID
StartChartManage().lockNetworkInfo = DeviceNetworkInfo(
wifiName: wifiName,
networkMac: networkMac,
secretKey: secretKey,
peerId: peerId,
);
Get.close(2); Get.close(2);
}); });
} }

View File

@ -5,6 +5,8 @@ import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/app_settings/app_colors.dart'; import 'package:star_lock/app_settings/app_colors.dart';
import 'package:star_lock/main/lockDetail/lockDetail/device_network_info.dart';
import 'package:star_lock/talk/starChart/star_chart_manage.dart';
import 'package:star_lock/tools/showTFView.dart'; import 'package:star_lock/tools/showTFView.dart';
import 'showDeleteAdministratorIsHaveAllDataWidget.dart'; import 'showDeleteAdministratorIsHaveAllDataWidget.dart';
@ -97,6 +99,7 @@ class ShowTipView {
} }
TextEditingController getController = TextEditingController(); TextEditingController getController = TextEditingController();
void showTFViewAlertDialog(TextEditingController controller, String title, void showTFViewAlertDialog(TextEditingController controller, String title,
String tipTitle, Function sureClick, String tipTitle, Function sureClick,
{List<TextInputFormatter>? inputFormatters, bool? isShowSuffixIcon}) { {List<TextInputFormatter>? inputFormatters, bool? isShowSuffixIcon}) {
@ -117,6 +120,7 @@ class ShowTipView {
return; return;
} }
sureClick(); sureClick();
StartChartManage().lockNetworkInfo = DeviceNetworkInfo();
}, },
cancelClick: () { cancelClick: () {
// //