fix:增加锁版未配网的提示
This commit is contained in:
parent
214ae198d9
commit
9682c558b7
@ -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
|
||||||
|
|||||||
@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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: () {
|
||||||
// 取消的时候停止扫描
|
// 取消的时候停止扫描
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user