From f037ab79698fe3b1c0a2bc8a3db0663febfa7f80 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期一, 19 四月 2021 15:57:43 +0800
Subject: [PATCH] 2021-04-19 1.1.HDL云萤石摄像头对接接口,增加platform参数, 代表平台  1.on+(默认) 2.evoyo

---
 Demo/EZOpensdk_iOS_4.15.1_build20201104/Demo/EZOpenSDKDemo/Global/GlobalKit.m |   40 +++++++++++++++++++++++++++++++++++++---
 1 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/Demo/EZOpensdk_iOS_4.15.1_build20201104/Demo/EZOpenSDKDemo/Global/GlobalKit.m b/Demo/EZOpensdk_iOS_4.15.1_build20201104/Demo/EZOpenSDKDemo/Global/GlobalKit.m
index 714770e..4a06059 100644
--- a/Demo/EZOpensdk_iOS_4.15.1_build20201104/Demo/EZOpenSDKDemo/Global/GlobalKit.m
+++ b/Demo/EZOpensdk_iOS_4.15.1_build20201104/Demo/EZOpenSDKDemo/Global/GlobalKit.m
@@ -8,6 +8,11 @@
 
 #import "GlobalKit.h"
 
+#define EZOpenSDKAccessToken @"EZOpenSDKAccessToken"
+#define EZhdlAccessToken @"EZhdlAccessToken"
+#define EZhdlRefreshToken @"EZhdlRefreshToken"
+#define EZHDLRequestHttpsHost @"EZHDLRequestHttpsHost"
+
 @implementation GlobalKit
 
 + (instancetype)shareKit
@@ -25,7 +30,10 @@
     self = [super init];
     if (self)
     {
-        _accessToken = [[NSUserDefaults standardUserDefaults] objectForKey:@"EZOpenSDKAccessToken"];
+        _accessToken = [[NSUserDefaults standardUserDefaults] objectForKey:EZOpenSDKAccessToken];
+        _hdlAccessToken = [[NSUserDefaults standardUserDefaults] objectForKey:EZhdlAccessToken];
+        _hdlRefreshToken = [[NSUserDefaults standardUserDefaults] objectForKey:EZhdlRefreshToken];
+        
         _deviceVerifyCodeBySerial = [NSMutableDictionary new];
     }
     return self;
@@ -35,14 +43,40 @@
 - (void)setAccessToken:(NSString *)accessToken
 {
     _accessToken = accessToken;
-    [[NSUserDefaults standardUserDefaults] setObject:accessToken?:@"" forKey:@"EZOpenSDKAccessToken"];
+    [[NSUserDefaults standardUserDefaults] setObject:accessToken?:@"" forKey:EZOpenSDKAccessToken];
     [[NSUserDefaults standardUserDefaults] synchronize];
+}
+
+- (void)setHdlAccessToken:(NSString *)hdlAccessToken
+{
+    _hdlAccessToken = hdlAccessToken;
+    [[NSUserDefaults standardUserDefaults] setObject:hdlAccessToken?:@"" forKey:EZhdlAccessToken];
+    [[NSUserDefaults standardUserDefaults] synchronize];
+}
+
+- (void)setHdlRefreshToken:(NSString *)hdlRefreshToken
+{
+    _hdlRefreshToken = hdlRefreshToken;
+    [[NSUserDefaults standardUserDefaults] setObject:hdlRefreshToken?:@"" forKey:EZhdlRefreshToken];
+    [[NSUserDefaults standardUserDefaults] synchronize];
+}
+
+- (void)setGlobalRequestHttpsHost:(NSString *)GlobalRequestHttpsHost
+{
+    _GlobalRequestHttpsHost = GlobalRequestHttpsHost;
+}
+
+- (void)sethdlPlatform:(int )hdlPlatform
+{
+    _hdlPlatform = hdlPlatform;
 }
 
 - (void)clearSession
 {
     _accessToken = nil;
-    [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"EZOpenSDKAccessToken"];
+    _hdlRefreshToken = nil;
+    _hdlRefreshToken = nil;
+    [[NSUserDefaults standardUserDefaults] removeObjectForKey:EZOpenSDKAccessToken];
     [[NSUserDefaults standardUserDefaults] synchronize];
 }
 

--
Gitblit v1.8.0