wxr
2021-03-08 797358fee56a79b8c783aebb87b275f2e8ad1334
Merge branch 'CJL' into temp-wxr
10个文件已修改
13380 ■■■■ 已修改文件
DLL/IOS/EZSDK.IOS.dll 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/Resource.designer.cs 13226 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/EZ/Base.lproj/EZMain.storyboard 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/zh-Hans.lproj/Localizable.strings 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/HDLCommon.cs 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpServerRequest.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewApiRes.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/IOS/EZSDK.IOS.dll
Binary files differ
HDL-ON_Android/Resources/Resource.designer.cs
Diff too large
HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard
@@ -141,6 +141,7 @@
                                <constraints>
                                    <constraint firstAttribute="height" constant="40" id="vLh-9U-8RO"/>
                                </constraints>
                                <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                <textInputTraits key="textInputTraits" keyboardType="alphabet"/>
                                <connections>
@@ -165,6 +166,7 @@
                                <constraints>
                                    <constraint firstAttribute="height" constant="40" id="DjM-dg-5en"/>
                                </constraints>
                                <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                <textInputTraits key="textInputTraits" keyboardType="alphabet"/>
                                <connections>
@@ -450,6 +452,7 @@
                                <constraints>
                                    <constraint firstAttribute="height" constant="34" id="FPO-BB-N1L"/>
                                </constraints>
                                <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                <textInputTraits key="textInputTraits" secureTextEntry="YES"/>
                            </textField>
@@ -912,7 +915,7 @@
    <inferredMetricsTieBreakers>
        <segue reference="9TP-S2-hhI"/>
        <segue reference="MFl-yy-ZsP"/>
        <segue reference="VYk-37-nb6"/>
        <segue reference="ikM-Zn-H8f"/>
    </inferredMetricsTieBreakers>
    <resources>
        <image name="addDevice_success" width="320" height="185"/>
HDL-ON_iOS/Resources/EZ/Base.lproj/EZMain.storyboard
@@ -2025,10 +2025,11 @@
                        <subviews>
                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入设备名称" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="r1W-d8-Rg7">
                                <rect key="frame" x="0.0" y="94" width="375" height="40"/>
                                <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                <constraints>
                                    <constraint firstAttribute="height" constant="40" id="NLX-OK-XZ7"/>
                                </constraints>
                                <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                <textInputTraits key="textInputTraits"/>
                            </textField>
@@ -2471,7 +2472,7 @@
    <inferredMetricsTieBreakers>
        <segue reference="Qls-Y0-o2u"/>
        <segue reference="X3Q-o5-p8V"/>
        <segue reference="q2I-Q5-CUY"/>
        <segue reference="9Tu-UR-Cms"/>
        <segue reference="vdt-wN-aOY"/>
    </inferredMetricsTieBreakers>
    <color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
HDL-ON_iOS/Resources/zh-Hans.lproj/Localizable.strings
@@ -23,7 +23,7 @@
"ad_restart_tip"="长按设备上的reset键10秒后松开,并等待大约30秒直到设备启动完成";
"ad_restart_done"="我已重启好";
"ad_get_device_info_msg"="正在查询设备信息,请稍后...";
"ad_already_added"="您已添加过此设备";
"ad_already_added"="此设备已被添加";
"ad_added_by_others"="此设备已被别人添加";
"get_info_fail"="查询失败,网络不给力";
"ad_input_manual"="手动输入";
HDL_ON/Common/HDLCommon.cs
@@ -384,7 +384,8 @@
            {
                //Dialog
                alarmPushConfirmDialog = null;
                Action backAction = () => {
                Action backAction = () =>
                {
                   
                };
                var skipPage = new MessageCenterPage();
@@ -489,5 +490,87 @@
            }
        }
        #endregion
        #region 跳转打开萤石云方法
        /// <summary>
        /// 获取子账号token并跳转设备列表页面
        /// </summary>
        /// <param name="bodyView"></param>
        public void Go2EZvizMonitor(FrameLayout bodyView)
        {
            var waitPage = new Loading();
            bodyView.AddChidren(waitPage);
            waitPage.Start(Language.StringByID(StringId.PleaseWait));
            new Thread(() =>
            {
                try
                {
                    //先获取萤石云子账号token
                    var result = new HttpServerRequest().EZGetChildToken();
                    if (result.Code == StateCode.SUCCESS)
                    {
                        var ezChildAccessToken = Newtonsoft.Json.JsonConvert.DeserializeObject<EZChildAccessToken>(result.Data.ToString());
                        Application.RunOnMainThread(() =>
                        {
                            if (!string.IsNullOrEmpty(ezChildAccessToken.accessToken))
                            {
#if __IOS__
                                //iOS
                                //1.设置所需河东的AccessToken和RefreshToken、域名地址
                                EZSDK.IOS.EZSDK.SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken);
                                EZSDK.IOS.EZSDK.SetRequestHttpsHost(OnAppConfig.Instance.RequestHttpsHost);
                                //2.设置萤石子账号的AccessToken到SDK
                                EZSDK.IOS.EZSDK.SetEZAccessToken(ezChildAccessToken.accessToken);
                                //3.打开摄像头设备列表页面
                                EZSDK.IOS.EZSDK.Go2EZvizMonitor();
#else
                                //Android
                                //1.设置所需河东的token、域名地址
                                //2.设置萤石子账号的token
                                //3.打开摄像头设备列表页面
                                ((BaseActivity)Shared.Application.Activity).SetCamera(b =>
                                {
                                    if (b)
                                    {
                                        Android.Content.Intent intent = new Android.Content.Intent();
                                        intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity"));
                                        Shared.Application.Activity.StartActivity(intent);
                                    }
                                });
#endif
                            }
                        });
                    }
                    else
                    {
                        IMessageCommon.Current.ShowErrorInfoAlter(result.Code);
                    }
                }
                catch (Exception ex)
                {
                }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        if (waitPage != null)
                        {
                            waitPage.RemoveFromParent();
                            waitPage = null;
                        }
                    });
                }
            })
            { IsBackground = true }.Start();
        }
        #endregion
    }
}
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -2160,5 +2160,18 @@
        #endregion
        #region 萤石云SDK相关接口
        /// <summary>
        /// 河东获取萤石云子账号token的接口
        /// </summary>
        public ResponsePackNew EZGetChildToken()
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            //d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_EZ_GetChildToken, requestJson);
        }
        #endregion
    }
}
HDL_ON/DAL/Server/NewAPI.cs
@@ -503,6 +503,18 @@
        /// </summary>
        public const string API_POST_Ir_CodeRemove = "/home-wisdom/app/device/ir/codeRemove";
        
        #endregion
        #endregion
        #region ■  -- 萤石SDK相关接口___________________________
        /// <summary>
        /// 河东获取萤石云子账号token的接口
        /// </summary>
        public const string API_POST_EZ_GetChildToken = "/home-wisdom/platform/childToken";
        #endregion
        #endregion
HDL_ON/DAL/Server/NewApiRes.cs
@@ -1466,6 +1466,23 @@
        public string messageType;
    }
    /// <summary>
    /// 萤石云子账号token
    /// </summary>
    [System.Serializable]
    public class EZChildAccessToken
    {
        /// <summary>
        /// token
        /// </summary>
        public string accessToken;
        /// <summary>
        ///  过期时间
        /// </summary>
        public string expireTime;
    }
    //#region 旧接口
    ///// <summary>
    ///// 
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -755,20 +755,7 @@
                        btnName.TextID = StringId.SecurityMonitoring;
                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
                        {
#if __IOS__
                            EZSDK.IOS.EZSDK.Go2EZvizMonitor();
#else  //安卓摄像头
                            ((BaseActivity)Shared.Application.Activity).SetCamera(b =>
                            {
                                if (b)
                                {
                                    Android.Content.Intent intent = new Android.Content.Intent();
                                    intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity"));
                                    Shared.Application.Activity.StartActivity(intent);
                                }
                            });
#endif
                            HDLCommon.Current.Go2EZvizMonitor(bodyView);
                        };
                        break;
                    case ShowFunction.Sensor: