From 3698c13aba988cd3e41b91b255e1c682c057e565 Mon Sep 17 00:00:00 2001
From: chenqiyang <1406175257@qq.com>
Date: 星期四, 23 三月 2023 11:49:58 +0800
Subject: [PATCH] 1.新增历史记录相关页面及功能 2.修改配网为热点配网 3.设备列表增加过滤门锁功能 4.增加添加设备通知功能
---
EZSDK/EZSDK/EZ/UIViewControllers/EZAPWiFiConfigViewController.m | 60 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 49 insertions(+), 11 deletions(-)
diff --git a/EZSDK/EZSDK/EZ/UIViewControllers/EZAPWiFiConfigViewController.m b/EZSDK/EZSDK/EZ/UIViewControllers/EZAPWiFiConfigViewController.m
index 0b9d955..0e3dc8c 100644
--- a/EZSDK/EZSDK/EZ/UIViewControllers/EZAPWiFiConfigViewController.m
+++ b/EZSDK/EZSDK/EZ/UIViewControllers/EZAPWiFiConfigViewController.m
@@ -139,17 +139,55 @@
password:self.password
deviceSerial:[GlobalKit shareKit].deviceSerialNo
verifyCode:[GlobalKit shareKit].deviceVerifyCode
- result:^(BOOL ret) {
- if (ret)
- {
- [self configSuccess];
- }
- else
- {
- [self configFailed];
- NSLog(@"config failed");
- }
- }];
+ deviceStatus:^(EZWifiConfigStatus status, NSString * _Nonnull deviceSerial) {
+// EZStrong(self);
+ switch (status) {
+ case DEVICE_WIFI_SENT_SUCCESS:// 鍚戣澶囧彂閫乄iFi淇℃伅鎴愬姛
+ // 绛夊緟璁惧閰嶇綉锛屽鏋渨ifi瀵嗙爜閿欒锛屾渶鍚庝細鍥炶皟DEVICE_PLATFORM_REGIST_FAILED
+ NSLog(@"鍚戣澶囧彂閫乄iFi淇℃伅鎴愬姛");
+ [self configSuccess];
+
+// [EZToast show:@"鍚戣澶囧彂閫乄iFi淇℃伅鎴愬姛"];
+ break;
+ case DEVICE_WIFI_SENT_FAILED:// 鍚戣澶囧彂閫乄iFi淇℃伅澶辫触
+ // 閰嶇綉澶辫触锛屽彲浠ラ噸璇�
+ NSLog(@"閰嶇綉澶辫触锛岃绋嶅悗閲嶈瘯");
+// [EZToast show:@"閰嶇綉澶辫触锛岃绋嶅悗閲嶈瘯"];
+ break;
+ case DEVICE_PLATFORM_REGISTED:// 璁惧娉ㄥ唽骞冲彴鎴愬姛
+ // TODO 灏嗚澶囨坊鍔犲埌鑷繁璐﹀彿涓�
+ NSLog(@"璁惧娉ㄥ唽骞冲彴鎴愬姛");
+// [EZToast show:@"璁惧娉ㄥ唽骞冲彴鎴愬姛"];
+
+// [self stopAction];
+// self.addBtn.hidden = NO;
+ break;
+ case DEVICE_PLATFORM_REGIST_FAILED:// 璁惧娉ㄥ唽骞冲彴澶辫触
+ // TODO 鍙互鑷寮�鍚柊涓�杞疆璇�
+ NSLog(@"璁惧娉ㄥ唽骞冲彴澶辫触");
+// [EZToast show:@"璁惧娉ㄥ唽骞冲彴澶辫触"];
+ [self stopAction];
+
+ break;
+ default:
+ break;
+ }
+ }];
+// [EZOPENSDK startAPConfigWifiWithSsid:self.ssid
+// password:self.password
+// deviceSerial:[GlobalKit shareKit].deviceSerialNo
+// verifyCode:[GlobalKit shareKit].deviceVerifyCode
+// result:^(BOOL ret) {
+// if (ret)
+// {
+// [self configSuccess];
+// }
+// else
+// {
+// [self configFailed];
+// NSLog(@"config failed");
+// }
+// }];
}
- (void) stopConfigWifi
--
Gitblit v1.8.0