From 35a1f11de802c78b89460c696ffbe8b1c8346a39 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 08 七月 2021 16:22:51 +0800
Subject: [PATCH] 2021-07-08 1.增加猫眼推送对接

---
 HDL_ON/DAL/Server/NewAPI.cs                             |    2 
 HDL_ON/Common/HDLCommon.cs                              |   57 +++++++++----
 HDL_ON/DAL/Server/HttpUtil.cs                           |    4 
 HDL_ON/Common/ApiUtlis.cs                               |    2 
 HDL_ON/DAL/Server/HttpServerRequest.cs                  |    3 
 DLL/IOS/EZSDK.IOS.dll                                   |    0 
 .vs/HDL_APP_Project/xs/UserPrefs.xml                    |   52 +++++-------
 HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard |   17 +++
 HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs                   |   90 ++++++++++++++++------
 9 files changed, 145 insertions(+), 82 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index a446f73..e34934f 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,41 +1,31 @@
 锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
-  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection4Page.cs">
+  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.08FD445C-3EE8-4ED2-BF28-B42ADD0DA92C" />
+  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs">
     <Files>
-      <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="226" Column="54" />
-      <File FileName="HDL_ON/Common/ApiUtlis.cs" Line="276" Column="72" />
-      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs" Line="26" Column="62" />
-      <File FileName="HDL_ON/Entity/Enumerative/Command.cs" Line="1406" Column="38" />
-      <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" Line="818" Column="84" />
-      <File FileName="HDL_ON/DAL/DriverLayer/Packet.cs" Line="197" Column="51" />
-      <File FileName="HDL_ON/Entity/Function/Light.cs" Line="51" Column="7" />
-      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection4Page.cs" Line="544" Column="35" />
+      <File FileName="HDL_ON/Common/HDLCommon.cs" Line="298" Column="43" />
+      <File FileName="HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs" Line="63" Column="39" />
+      <File FileName="HDL_ON/DAL/Server/NewApiRes.cs" Line="1424" Column="23" />
+      <File FileName="HDL-ON_Android/Assets/Language.ini" Line="1722" Column="5" />
+      <File FileName="HDL_ON/Common/R.cs" Line="1242" Column="37" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs" Line="310" Column="86" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/ObjectClass.cs" Line="141" Column="23" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
           <Node name="HDL_APP_Project" expanded="True">
             <Node name="HDL_ON" expanded="True">
-              <Node name="Common" expanded="True" />
-              <Node name="DAL" expanded="True">
-                <Node name="DriverLayer" expanded="True" />
-                <Node name="Server" expanded="True" />
+              <Node name="Common" expanded="True">
+                <Node name="HDLCommon.cs" selected="True" />
               </Node>
-              <Node name="Entity" expanded="True">
-                <Node name="Enumerative" expanded="True" />
-                <Node name="Function" expanded="True" />
-              </Node>
-              <Node name="UI" expanded="True">
-                <Node name="UI1-Login" expanded="True" />
-                <Node name="UI2" expanded="True">
-                  <Node name="4-PersonalCenter" expanded="True">
-                    <Node name="AddDevice" expanded="True">
-                      <Node name="MiniRemoteControl" expanded="True">
-                        <Node name="AddMiniRemoteControlDirection4Page.cs" selected="True" />
-                      </Node>
-                    </Node>
-                  </Node>
-                  <Node name="FuntionControlView" expanded="True" />
+            </Node>
+            <Node name="HDL-ON_Android" expanded="True">
+              <Node name="Assets" expanded="True" />
+            </Node>
+            <Node name="HDL-ON_iOS" expanded="True">
+              <Node name="Resources" expanded="True">
+                <Node name="EZ" expanded="True">
+                  <Node name="Base.lproj" expanded="True" />
                 </Node>
               </Node>
             </Node>
@@ -50,10 +40,10 @@
     <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
     <String>Shared.IOS/Shared.IOS.csproj</String>
   </DisabledProjects>
-  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
+  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
   <MonoDevelop.Ide.DebuggingService.Breakpoints>
     <BreakpointStore>
-      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" line="42" column="1" />
+      <Breakpoint file="/Users/jlchen/JLChen/ProjectsCode/HDLGit/ON+/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" line="42" column="1" />
     </BreakpointStore>
   </MonoDevelop.Ide.DebuggingService.Breakpoints>
   <MultiItemStartupConfigurations />
diff --git a/DLL/IOS/EZSDK.IOS.dll b/DLL/IOS/EZSDK.IOS.dll
index fdc491c..fb2f1f7 100644
--- a/DLL/IOS/EZSDK.IOS.dll
+++ b/DLL/IOS/EZSDK.IOS.dll
Binary files differ
diff --git a/HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard b/HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard
index 284eeed..bba85b8 100644
--- a/HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard
+++ b/HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard
@@ -2,7 +2,6 @@
 <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="1Qq-y9-5Vr">
     <device id="retina4_7" orientation="portrait" appearance="light"/>
     <dependencies>
-        <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -686,9 +685,21 @@
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q0X-wy-A5B">
                                 <rect key="frame" x="47.5" y="362" width="311.5" height="40"/>
                                 <attributedString key="attributedText">
-                                    <fragment content="杩斿洖demo锛岀瓑寰呬笌璁惧杩炴帴锛屾垚鍔熷悗鑷姩杩涘叆涓嬩竴姝ユ搷浣溿��">
+                                    <fragment content="杩斿洖">
+                                        <attributes>
+                                            <font key="NSFont" size="14" name=".PingFangSC-Regular"/>
+                                            <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" minimumLineHeight="20" tighteningFactorForTruncation="0.0"/>
+                                        </attributes>
+                                    </fragment>
+                                    <fragment content="APP">
                                         <attributes>
                                             <font key="NSFont" metaFont="system" size="14"/>
+                                            <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" minimumLineHeight="20" tighteningFactorForTruncation="0.0"/>
+                                        </attributes>
+                                    </fragment>
+                                    <fragment content="锛岀瓑寰呬笌璁惧杩炴帴锛屾垚鍔熷悗鑷姩杩涘叆涓嬩竴姝ユ搷浣溿��">
+                                        <attributes>
+                                            <font key="NSFont" size="14" name=".PingFangSC-Regular"/>
                                             <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" minimumLineHeight="20" tighteningFactorForTruncation="0.0"/>
                                         </attributes>
                                     </fragment>
@@ -914,7 +925,7 @@
     </scenes>
     <inferredMetricsTieBreakers>
         <segue reference="9TP-S2-hhI"/>
-        <segue reference="MFl-yy-ZsP"/>
+        <segue reference="9Lc-Kx-oZS"/>
         <segue reference="ikM-Zn-H8f"/>
     </inferredMetricsTieBreakers>
     <resources>
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index 31d4229..a359d64 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -271,7 +271,7 @@
 
                         foreach (var video in FunctionList.List.videoIntercom)
                         {
-                            if (video.interphoneType == "IMOUVISIAL")
+                            if (video.interphoneType == InterphoneType.IMOUVISIAL.ToString())
                             {
                                 UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken = video.subAccountToken;
                             }
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index d7de09c..88c9782 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -273,7 +273,7 @@
                     if (jpushMessageInfo.messageType.Contains(PushMessageType.Alarm.ToString()))
                     {
                         //鎶ヨ鎺ㄩ�佸脊绐楁彁绀�
-                        ShowAlarmPushMessage(jpushMessageInfo,true);
+                        ShowAlarmPushMessage(jpushMessageInfo, true);
                     }
                     else if (jpushMessageInfo.messageType.Contains(PushMessageType.FLCall.ToString()))
                     {
@@ -303,28 +303,44 @@
                         if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return;
 
                         //瀛楁鍏煎闂锛屽彧鑳界洿鎺ュ彇鍊间簡
-                        var json= Newtonsoft.Json.Linq.JObject.Parse(jpushMessageInfo.expantContent);
+                        var json = Newtonsoft.Json.Linq.JObject.Parse(jpushMessageInfo.expantContent);
+                        //瑙嗗璁插巶瀹剁被鍨�
+                        string interphoneTypeEnum = json["interphoneTypeEnum"].ToString();
+
+                        if (string.IsNullOrEmpty(interphoneTypeEnum)) return;
+
                         ESVideoInfo eSVideoInfo = new ESVideoInfo();// GetESOnVideoJson(jpushMessageInfo.expantContent);
-                        eSVideoInfo.callId = json["callId"].ToString();
-                        //eSVideoInfo.Lc_AccessToken = UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken;//json["subAccountToken"].ToString();//
-                        eSVideoInfo.Lc_AccessToken = json["subAccountToken"].ToString();//2021-05-13 鐩墠浜戠杩樻病鎷垮埌Lc_AccessToken锛岀洰鍓嶆病鍔炴硶姝e父浣跨敤
-                        eSVideoInfo.Lc_DeviceId = json["deviceId"].ToString();
-                        eSVideoInfo.Lc_Location = OnAppConfig.Instance.RequestHttpsHost.Contains("China") ? 0 : 1;
-                        eSVideoInfo.Lc_PlayToken = json["token"].ToString();
-                        eSVideoInfo.Lc_Psk = json["cname"].ToString();
+
+                        if (interphoneTypeEnum == InterphoneType.IMOUVISIAL.ToString())
+                        {
+
+                            eSVideoInfo.callId = json["callId"].ToString();
+                            //eSVideoInfo.Lc_AccessToken = UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken;//json["subAccountToken"].ToString();//
+                            eSVideoInfo.Lc_AccessToken = json["subAccountToken"].ToString();//2021-05-13 鐩墠浜戠杩樻病鎷垮埌Lc_AccessToken锛岀洰鍓嶆病鍔炴硶姝e父浣跨敤
+                            eSVideoInfo.Lc_DeviceId = json["deviceId"].ToString();
+                            eSVideoInfo.Lc_Location = OnAppConfig.Instance.RequestHttpsHost.Contains("China") ? 0 : 1;
+                            eSVideoInfo.Lc_PlayToken = json["token"].ToString();
+                            eSVideoInfo.Lc_Psk = json["cname"].ToString();
+                        }
+                        else if (interphoneTypeEnum == InterphoneType.EZVIZ.ToString())
+                        {
+                            eSVideoInfo.Lc_AccessToken = json["subToken"].ToString();//"瀛愯处鍙穞oken
+                            eSVideoInfo.DeviceSerial = json["devSerial"].ToString();//璁惧搴忓垪鍙�
+                            eSVideoInfo.HomeId = jpushMessageInfo.HomeId;
+                        }
 
                         if (eSVideoInfo == null) return;
 
-                        ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo, "IMOUVISIAL");
+                        ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo, interphoneTypeEnum);
 
                     }
-                    else if(jpushMessageInfo.messageType.Contains(PushMessageType.Prompt.ToString()))
+                    else if (jpushMessageInfo.messageType.Contains(PushMessageType.Prompt.ToString()))
                     {
                         ShowAlarmPushMessage(jpushMessageInfo, false);
                     }
                 }
             }
-            catch(Exception EX)
+            catch (Exception EX)
             {
                 Utlis.WriteLine("catch: " + EX.ToString());
             }
@@ -436,7 +452,7 @@
         /// </summary>
         /// <param name="jpushMessageInfo"></param>
         /// <param name="isAlarm">鏄惁鏄姤璀︿俊鎭紝锛堝姞杞界殑寮圭獥棰滆壊涓嶄竴鏍凤級</param>
-        public void ShowAlarmPushMessage(JPushMessageInfo jpushMessageInfo,bool isAlarm)
+        public void ShowAlarmPushMessage(JPushMessageInfo jpushMessageInfo, bool isAlarm)
         {
             //娌$櫥褰曚笉澶勭悊
             if (UserInfo.Current == null || !UserInfo.Current.IsLogin || MainPage.BasePageView == null)
@@ -600,10 +616,12 @@
                     var result = new HttpServerRequest().EZGetChildToken();
                     if (result.Code == StateCode.SUCCESS)
                     {
-                        var ezChildAccessToken = Newtonsoft.Json.JsonConvert.DeserializeObject<EZChildAccessToken>(result.Data.ToString());
+                        var ezChildAccessToken = result.Data.ToString();
+
+                        //var ezChildAccessToken = Newtonsoft.Json.JsonConvert.DeserializeObject<EZChildAccessToken>(result.Data.ToString());
                         Application.RunOnMainThread(() =>
                         {
-                            if (!string.IsNullOrEmpty(ezChildAccessToken.accessToken))
+                            if (!string.IsNullOrEmpty(ezChildAccessToken))
                             {
 #if __IOS__
                                 //iOS
@@ -611,12 +629,15 @@
                                 EZSDK.IOS.EZSDK.InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b");
                                 //1.璁剧疆鎵�闇�娌充笢鐨凙ccessToken鍜孯efreshToken銆佸煙鍚嶅湴鍧�
                                 EZSDK.IOS.EZSDK.SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken);
-                                EZSDK.IOS.EZSDK.SetRequestHttpsHost(OnAppConfig.Instance.RequestHttpsHost);
+                                EZSDK.IOS.EZSDK.SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, DB_ResidenceData.Instance.CurrentRegion.id);
                                 //2.璁剧疆钀ょ煶瀛愯处鍙风殑AccessToken鍒癝DK
-                                EZSDK.IOS.EZSDK.SetEZAccessToken(ezChildAccessToken.accessToken);
-                                //3.鎵撳紑鎽勫儚澶磋澶囧垪琛ㄩ〉闈�
+                                EZSDK.IOS.EZSDK.SetEZAccessToken(ezChildAccessToken);
+                                ////3.鎵撳紑鎽勫儚澶磋澶囧垪琛ㄩ〉闈�
                                 EZSDK.IOS.EZSDK.Go2EZvizMonitor();
 
+                                //EZSDK.IOS.EZDeviceInfo info = new EZSDK.IOS.EZDeviceInfo();
+                                //info.de
+                                //EZSDK.IOS.EZSDK.Play(info);
 #else
                                 //Android
                                 //1.璁剧疆鎵�闇�娌充笢鐨則oken銆佸煙鍚嶅湴鍧�
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index ec3e6ad..0944506 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -2469,10 +2469,13 @@
         #region 鈻� 钀ょ煶浜慡DK鐩稿叧鎺ュ彛_________________________
         /// <summary>
         /// 娌充笢鑾峰彇钀ょ煶浜戝瓙璐﹀彿token鐨勬帴鍙�
+        /// 2021-07-07 鏂版柟妗堟帴鍙h皟鏁村鎺�
         /// </summary>
         public ResponsePackNew EZGetChildToken()
         {
             Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("platform", "1");
             var requestJson = HttpUtil.GetSignRequestJson(d);
             return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_EZ_GetChildToken, requestJson);
         }
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index b271fdb..0dec30c 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,8 +18,8 @@
         /// 鍏叡鍩熷悕灏辫繎瑙f瀽
         /// 
         /// </summary>
-        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
-        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
+        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
         /// <summary>
         /// RegionMark
         /// </summary>
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index 2871e44..07638c5 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -599,7 +599,7 @@
         /// <summary>
         /// 娌充笢鑾峰彇钀ょ煶浜戝瓙璐﹀彿token鐨勬帴鍙�
         /// </summary>
-        public const string API_POST_EZ_GetChildToken = "/home-wisdom/platform/childToken";
+        public const string API_POST_EZ_GetChildToken = "/home-wisdom/platform/yingshi/child/token";
 
 
         #endregion
diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
index b6ad254..19a9398 100644
--- a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -4,6 +4,7 @@
 using System.Threading;
 using System.Collections.Generic;
 using HDL_ON.UI.UI2.PersonalCenter.PirDevice;
+using HDL_ON.Entity;
 
 #if __IOS__
 using Shared.IOS.ESVideoOnSDK;
@@ -66,7 +67,7 @@
             int.TryParse(mESVideoInfo.roomno, out roomID);
 
 #if __IOS__
-            if (interphoneType == "IMOUVISIAL")
+            if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
             {
                 //涔愭鍙瀵硅
                 //1.鍒濆鍖朙COpenSDK_Api
@@ -95,7 +96,7 @@
             }
 #else
             Intent intent = null;
-            if (interphoneType == "IMOUVISIAL")
+            if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
             {
                 intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
             }
@@ -136,7 +137,7 @@
             int roomID = 0;
             int.TryParse(mESVideoInfo.roomno, out roomID);
 #if __IOS__
-            if (interphoneType == "IMOUVISIAL")
+            if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
             {
                 //涔愭鍙瀵硅
                 //1.鍒濆鍖朙COpenSDK_Api
@@ -152,6 +153,21 @@
                 vc.MLCCallDelegate = mOnLCCallDelegate;
                 //vc.MLCCallDelegate = new OnLCCallDelegate(this);
                 Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
+            }
+            else if (interphoneType == InterphoneType.EZVIZ.ToString())
+            {
+                //钀ょ煶鐚溂鍛煎彨
+                //鍒濆鍖栬悿鐭充簯SDK锛屼腑鏂囧浗鍐卥ey銆佽嫳鏂囨捣澶杒ey 寮�鍙戣�呰处鍙蜂娇鐢ㄥ簲鐢ㄥ寘鍚嶇敵璇风殑APPKEY锛屼笉鍚屽寘鍚嶅簲鐢ㄩ渶閰嶇疆涓嶅悓鐨凙PPKEY
+                EZSDK.IOS.EZSDK.InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b");
+                //1.璁剧疆鎵�闇�娌充笢鐨凙ccessToken鍜孯efreshToken銆佸煙鍚嶅湴鍧�
+                EZSDK.IOS.EZSDK.SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken);
+          
+                EZSDK.IOS.EZSDK.SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, mESVideoInfo.HomeId);
+                //2.璁剧疆钀ょ煶瀛愯处鍙风殑AccessToken鍒癝DK
+                EZSDK.IOS.EZSDK.SetEZAccessToken(mESVideoInfo.Lc_AccessToken);
+                //3.鎵撳紑瑙嗛鎾斁椤甸潰
+                EZSDK.IOS.EZSDK.PlayWithDeviceSerial(mESVideoInfo.DeviceSerial);
+
             }
             else
             {
@@ -170,9 +186,12 @@
             #region
 
             Intent intent = null;
-            if (interphoneType == "IMOUVISIAL")
+            if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
             {
                 intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
+            } else if (interphoneType == InterphoneType.EZVIZ.ToString())
+            {
+                //钀ょ煶鐚溂鍛煎彨澶勭悊
             }
             else
             {
@@ -598,31 +617,33 @@
         }
 
         #endregion
+
+       
 #endif
 
-        /// <summary>
-        /// 娴嬭瘯鏂规硶
-        /// </summary>
-        /// <param name="isMonitor"></param>
-        public void Test(bool isMonitor = true)
-        {
-            ESVideoInfo eSVideoInfo = new ESVideoInfo()
-            {
-                DeviceName = "瀹ゅ鏈�88",
-                ESVideoUUID = "JJY000019VPLLF",
+        ///// <summary>
+        ///// 娴嬭瘯鏂规硶
+        ///// </summary>
+        ///// <param name="isMonitor"></param>
+        //public void Test(bool isMonitor = true)
+        //{
+        //    ESVideoInfo eSVideoInfo = new ESVideoInfo()
+        //    {
+        //        DeviceName = "瀹ゅ鏈�88",
+        //        ESVideoUUID = "JJY000019VPLLF",
 
-            };
-            if (isMonitor)
-            {
-                ShowESVideoMonitor(eSVideoInfo, "");
-            }
-            else
-            {
-                eSVideoInfo.callId = "88888";
-                ShowESvideoVideoIntercom(eSVideoInfo, "");
-            }
+        //    };
+        //    if (isMonitor)
+        //    {
+        //        ShowESVideoMonitor(eSVideoInfo, "");
+        //    }
+        //    else
+        //    {
+        //        eSVideoInfo.callId = "88888";
+        //        ShowESvideoVideoIntercom(eSVideoInfo, "");
+        //    }
 
-        }
+        //}
     }
 
     /// <summary>
@@ -667,9 +688,9 @@
 
 
         //========================澶у崕==========================
-
         /// <summary>
         /// 璐﹀彿accessToken
+        /// 钀ょ煶瀛愯处鍙稵oken涔熷叡鐢ㄨ繖涓瓧娈�
         /// </summary>
         public string Lc_AccessToken = string.Empty;
 
@@ -692,6 +713,17 @@
         /// 璐﹀彿鏍囪锛�0鍥藉唴锛�1鍥藉锛涘浗鍐呭浗澶栬闂兘鍦板潃涓嶄竴鏍�
         /// </summary>
         public int Lc_Location = 0;
+
+        //========================钀ょ煶浜戠尗鐪�==========================
+        /// <summary>
+        /// 浣忓畢Id
+        /// </summary>
+        public string HomeId = string.Empty;
+        /// <summary>
+        /// 璁惧搴忓垪鍙�
+        /// </summary>
+        public string DeviceSerial = string.Empty;
+
 
     }
 
@@ -728,5 +760,11 @@
         /// 澶у崕鍙瀵硅骞冲彴
         /// </summary>
         IMOUVISIAL,
+        /// <summary>
+        /// 钀ょ煶鐚溂鍛煎彨
+        /// </summary>
+        EZVIZ,
+
+
     }
 }

--
Gitblit v1.8.0