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/EZDeviceResultViewController.m |   48 ++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 40 insertions(+), 8 deletions(-)

diff --git a/EZSDK/EZSDK/EZ/UIViewControllers/EZDeviceResultViewController.m b/EZSDK/EZSDK/EZ/UIViewControllers/EZDeviceResultViewController.m
index e1727fe..500c658 100644
--- a/EZSDK/EZSDK/EZ/UIViewControllers/EZDeviceResultViewController.m
+++ b/EZSDK/EZSDK/EZ/UIViewControllers/EZDeviceResultViewController.m
@@ -90,7 +90,7 @@
 //                      [self handleTheError:error];
 //                  }];
         
-        [EZHttpUtil addDeviceByHDL:[GlobalKit shareKit].deviceSerialNo
+        [EZHttpUtil.sharedManager addDeviceByHDL:[GlobalKit shareKit].deviceSerialNo
                    verifyCode:[GlobalKit shareKit].deviceVerifyCode
                    completion:^(ResponseData *responseData) {
                        [hud hide:YES];
@@ -127,13 +127,29 @@
 //                          [hud hide:YES];
 //                          [self handleTheError:error];
 //                      }];
-            [EZHttpUtil addDeviceByHDL:[GlobalKit shareKit].deviceSerialNo
-                       verifyCode:[GlobalKit shareKit].deviceVerifyCode
-                       completion:^(ResponseData *responseData) {
-                           [hud hide:YES];
-                           [self handleTheError:responseData];
-                       }];
-            
+            if ([GlobalKit shareKit].deviceType==HDLEZDeviceType_Door) {//涓洪棬绂佽澶囷紙闇�瑕侀獙璇侀棬閿侊級
+                [EZHttpUtil.sharedManager verifyLocalLockByHDL:[GlobalKit shareKit].deviceSerialNo completion:^(ResponseData * _Nonnull responseData) {
+                    [hud hide:YES];
+                    if (responseData.success) {
+                        self.resultLabel.numberOfLines=2;
+                        self.resultLabel.adjustsFontSizeToFitWidth=YES;
+                        self.resultLabel.text = NSLocalizedString(@"ad_result_verify_local_lock",@"璇峰湪2鍒嗛挓涔嬪唴鏍¢獙宸叉坊鍔犵殑涓荤敤鎴锋寚绾广�佸瘑閽ユ垨鎰熷簲鍗★紝鏍¢獙瀹屾垚璇风偣鍑诲凡鏍¢獙鎸夐挳");
+                        
+                        [self.actionButton setTitle:NSLocalizedString(@"ad_verified", @"宸叉牎楠�") forState:UIControlStateNormal];
+                    }else{
+                        [self handleTheError:responseData];
+                    }
+
+                    NSLog(@"璋冪敤楠岃瘉鎺ュ彛杩斿洖锛�%@",responseData.data);
+                }];
+            }else{
+                [EZHttpUtil.sharedManager addDeviceByHDL:[GlobalKit shareKit].deviceSerialNo
+                           verifyCode:[GlobalKit shareKit].deviceVerifyCode
+                           completion:^(ResponseData *responseData) {
+                               [hud hide:YES];
+                               [self handleTheError:responseData];
+                           }];
+            }
             
         }
         else
@@ -144,6 +160,22 @@
             [alertView show];
         }
     }
+    else if([self.actionButton.titleLabel.text isEqualToString:NSLocalizedString(@"ad_verified",@"宸叉牎楠�")])
+    {
+        __weak MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
+        hud.labelText = NSLocalizedString(@"ad_adding_msg", @"姝e湪娣诲姞锛岃绋嶅��...");
+        [EZHttpUtil.sharedManager addDeviceByHDL:[GlobalKit shareKit].deviceSerialNo
+                   verifyCode:[GlobalKit shareKit].deviceVerifyCode
+                   completion:^(ResponseData *responseData) {
+                       [hud hide:YES];
+                if (!responseData.success){
+                    [self.view makeToast:NSLocalizedString(@"wifi_add_fail", @"娣诲姞澶辫触") duration:2.0 position:@"center"];
+                }else{
+                    [self handleTheError:responseData];
+                }
+
+        }];
+    }
     else
     {
         [self doSearchDevice];

--
Gitblit v1.8.0