From 3e4be5ed4d2c0395dd60e392baf86c59762059b1 Mon Sep 17 00:00:00 2001
From: Davin <591807572@qq.com>
Date: 星期五, 30 六月 2023 10:14:50 +0800
Subject: [PATCH] feature 猫眼全屏布局调整 && UI细节适配

---
 EZSDK/EZSDK/EZ/Global/EZHttpUtil.m |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/EZSDK/EZSDK/EZ/Global/EZHttpUtil.m b/EZSDK/EZSDK/EZ/Global/EZHttpUtil.m
index e258090..a24250c 100644
--- a/EZSDK/EZSDK/EZ/Global/EZHttpUtil.m
+++ b/EZSDK/EZSDK/EZ/Global/EZHttpUtil.m
@@ -30,6 +30,9 @@
 #define API_POST_EZ_DeleteAlarmMes @"/home-wisdom/platform/yingshi/alarm/delete"//鍒犻櫎鎶ヨ娑堟伅
 #define API_POST_EZ_ReadAlarmMes @"/home-wisdom/platform/yingshi/alarm/updateChecked"//鏍囪鎶ヨ娑堟伅宸茶
 
+#define API_POST_EZ_GetCoverSwitchStaus @"/home-wisdom/platform/yingshi/getCoverSwitchStatus"//鑾峰彇钀ょ煶闀滃ご閬斀寮�鍏崇姸鎬�
+#define API_POST_EZ_GetCoverSwitch @"/home-wisdom/platform/yingshi/coverSwitch"//璁剧疆钀ょ煶闀滃ご閬斀寮�鍏�
+
 #pragma mark APP_KEY
 #define APP_KEY @"HDL-HOME-APP-TEST"
 #define SECRET_KEY @"WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"
@@ -421,6 +424,59 @@
     }];
 }
 
+/**
+ *  @since 娌充笢鑾峰彇璁惧娑堟伅
+ *  @param deviceId   璁惧id
+ *  @param completion   鍥炶皟block锛宔rror涓虹┖鏃惰〃绀烘垚鍔�
+ */
+- (void)getCoverSwitchStatus:(NSString *)deviceId
+                  completion:(void (^)(ResponseData *responseData))completion {
+    //璁剧疆璇锋眰鍙傛暟
+    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
+    [parameters setValue:deviceId forKey:@"deviceId"];
+    [parameters setValue:@(1) forKey:@"platform"];
+    [parameters setValue:[NSString stringWithFormat:@"%@",[GlobalKit shareKit].hdlAppKey] forKey:@"appKey"];
+    [parameters setValue:[GlobalKit shareKit].hdlHomeId forKey:@"homeId"];
+    
+    parameters = [self GetSignRequestDictionary:parameters];
+    
+    NSLog(@"鑾峰彇璁惧娑堟伅鍙傛暟锛�%@",parameters);
+    
+    [self requestHttpsPost:API_POST_EZ_GetCoverSwitchStaus parameters:parameters completion:^(ResponseData *responseData) {
+        if (completion) {
+            completion (responseData);
+        }
+    }];
+}
+
+/**
+ *  @since 娌充笢鑾峰彇璁惧娑堟伅
+ *  @param deviceId   璁惧id
+ *  @param enable   闅愮閬斀鐘舵��
+ *  @param completion   鍥炶皟block锛宔rror涓虹┖鏃惰〃绀烘垚鍔�
+ */
+- (void)getCoverSwitchStatus:(NSString *)deviceId
+                      enable:(NSInteger)enable
+                  completion:(void (^)(ResponseData *responseData))completion {
+    //璁剧疆璇锋眰鍙傛暟
+    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
+    [parameters setValue:deviceId forKey:@"deviceId"];
+    [parameters setValue:@(enable) forKey:@"enable"];
+    [parameters setValue:@(1) forKey:@"platform"];
+    [parameters setValue:[NSString stringWithFormat:@"%@",[GlobalKit shareKit].hdlAppKey] forKey:@"appKey"];
+    [parameters setValue:[GlobalKit shareKit].hdlHomeId forKey:@"homeId"];
+    
+    parameters = [self GetSignRequestDictionary:parameters];
+    
+    NSLog(@"鑾峰彇璁惧娑堟伅鍙傛暟锛�%@",parameters);
+    
+    [self requestHttpsPost:API_POST_EZ_GetCoverSwitch parameters:parameters completion:^(ResponseData *responseData) {
+        if (completion) {
+            completion (responseData);
+        }
+    }];
+}
+
 /// 鍒锋柊token
 /// @param block 缁撴灉
 - (void)refreshHDLToken:(void (^)(BOOL isSuccess))block{
@@ -501,6 +557,7 @@
         URL = TestRequestHttpsHost;
     }
     URL = [NSString stringWithFormat:@"%@%@", URL, apiPath];
+    NSLog(@"############鎺ュ彛璇锋眰url锛�%@", URL);
     
 //    NSURLSessionDataTask * task=nil;
     AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];

--
Gitblit v1.8.0