优化配网成功后的提示问题

This commit is contained in:
sky_min 2025-11-29 13:34:03 +08:00
parent 18f059663a
commit d44c7ee20e
3 changed files with 13 additions and 13 deletions

View File

@ -54,7 +54,7 @@ class DeviceNetworkInfo {
String? networkMac; String? networkMac;
String? secretKey; String? secretKey;
String? peerId; String? peerId;
String? rssi; int? rssi;
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final map = <String, dynamic>{}; final map = <String, dynamic>{};

View File

@ -61,7 +61,7 @@ class ConfiguringWifiLogic extends BaseGetXController {
required String secretKey, required String secretKey,
required String deviceMac, required String deviceMac,
required String networkMac, required String networkMac,
int? rssi, required int rssi,
}) async { }) async {
try { try {
final LoginEntity entity = await ApiRepository.to.settingDeviceNetwork( final LoginEntity entity = await ApiRepository.to.settingDeviceNetwork(
@ -174,7 +174,7 @@ class ConfiguringWifiLogic extends BaseGetXController {
secretKey: secretKey, secretKey: secretKey,
deviceMac: deviceMac ?? '', deviceMac: deviceMac ?? '',
networkMac: networkMac ?? '', networkMac: networkMac ?? '',
rssi: rssi, rssi: rssi ?? 0,
); );
if (info.errorCode!.codeIsSuccessful) { if (info.errorCode!.codeIsSuccessful) {
// peerID // peerID
@ -183,7 +183,7 @@ class ConfiguringWifiLogic extends BaseGetXController {
networkMac: networkMac, networkMac: networkMac,
secretKey: secretKey, secretKey: secretKey,
peerId: peerId, peerId: peerId,
rssi: rssi.toString(), rssi: rssi,
); );
state.lockSetInfoData.value?.lockBasicInfo?.networkInfo?.peerId = state.lockSetInfoData.value?.lockBasicInfo?.networkInfo?.peerId =
@ -191,7 +191,7 @@ class ConfiguringWifiLogic extends BaseGetXController {
state.lockSetInfoData.value?.lockBasicInfo?.networkInfo?.wifiName = state.lockSetInfoData.value?.lockBasicInfo?.networkInfo?.wifiName =
wifiName; wifiName;
state.lockSetInfoData.value?.lockBasicInfo?.networkInfo?.rssi = state.lockSetInfoData.value?.lockBasicInfo?.networkInfo?.rssi =
rssi as int?; rssi;
/// ,peerId /// ,peerId
StartChartManage().lockPeerId = peerId; StartChartManage().lockPeerId = peerId;

View File

@ -79,14 +79,14 @@ class _ConfiguringWifiPageState extends State<ConfiguringWifiPage>
SizedBox( SizedBox(
height: 20.h, height: 20.h,
), ),
Text( // Text(
'请确保网络是2.4GHz Wi-Fi'.tr, // '请确保网络是2.4GHz Wi-Fi'.tr,
style: TextStyle( // style: TextStyle(
color: AppColors.blackColor, // color: AppColors.blackColor,
fontSize: 20.sp, // fontSize: 20.sp,
fontWeight: FontWeight.w500, // fontWeight: FontWeight.w500,
), // ),
), // ),
], ],
)); ));
} }