优化配网成功后的提示问题
This commit is contained in:
parent
18f059663a
commit
d44c7ee20e
@ -54,7 +54,7 @@ class DeviceNetworkInfo {
|
||||
String? networkMac;
|
||||
String? secretKey;
|
||||
String? peerId;
|
||||
String? rssi;
|
||||
int? rssi;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
|
||||
@ -61,7 +61,7 @@ class ConfiguringWifiLogic extends BaseGetXController {
|
||||
required String secretKey,
|
||||
required String deviceMac,
|
||||
required String networkMac,
|
||||
int? rssi,
|
||||
required int rssi,
|
||||
}) async {
|
||||
try {
|
||||
final LoginEntity entity = await ApiRepository.to.settingDeviceNetwork(
|
||||
@ -174,7 +174,7 @@ class ConfiguringWifiLogic extends BaseGetXController {
|
||||
secretKey: secretKey,
|
||||
deviceMac: deviceMac ?? '',
|
||||
networkMac: networkMac ?? '',
|
||||
rssi: rssi,
|
||||
rssi: rssi ?? 0,
|
||||
);
|
||||
if (info.errorCode!.codeIsSuccessful) {
|
||||
// 设置锁的peerID
|
||||
@ -183,7 +183,7 @@ class ConfiguringWifiLogic extends BaseGetXController {
|
||||
networkMac: networkMac,
|
||||
secretKey: secretKey,
|
||||
peerId: peerId,
|
||||
rssi: rssi.toString(),
|
||||
rssi: rssi,
|
||||
);
|
||||
|
||||
state.lockSetInfoData.value?.lockBasicInfo?.networkInfo?.peerId =
|
||||
@ -191,7 +191,7 @@ class ConfiguringWifiLogic extends BaseGetXController {
|
||||
state.lockSetInfoData.value?.lockBasicInfo?.networkInfo?.wifiName =
|
||||
wifiName;
|
||||
state.lockSetInfoData.value?.lockBasicInfo?.networkInfo?.rssi =
|
||||
rssi as int?;
|
||||
rssi;
|
||||
|
||||
/// 配网成功后,赋值锁的peerId
|
||||
StartChartManage().lockPeerId = peerId;
|
||||
|
||||
@ -79,14 +79,14 @@ class _ConfiguringWifiPageState extends State<ConfiguringWifiPage>
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
Text(
|
||||
'请确保网络是2.4GHz Wi-Fi'.tr,
|
||||
style: TextStyle(
|
||||
color: AppColors.blackColor,
|
||||
fontSize: 20.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
// Text(
|
||||
// '请确保网络是2.4GHz Wi-Fi'.tr,
|
||||
// style: TextStyle(
|
||||
// color: AppColors.blackColor,
|
||||
// fontSize: 20.sp,
|
||||
// fontWeight: FontWeight.w500,
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user