wei
2021-04-01 ccdff82fac4bcc1067ec806ade5ae897f1214f4d
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -480,6 +480,7 @@
                            IsOthreShare = mHome.IsOtherShare,
                            accountType = mHome.accountType,
                            isRemoteControl = mHome.isRemoteControl,
                            isBindGateway = mHome.isBindGateway,
                            longitude = mHome.longitude,
                            latitude = mHome.latitude,
                            deliverstatus = mHome.deliverstatus,
@@ -491,7 +492,14 @@
                            Address = mHome.homeAddress,
                            isAllowCreateScene = mHome.isAllowCreateScene,
                        };
                        UserInfo.Current.regionList.Add(home);
                        if (home.isBindGateway)
                        {
                            UserInfo.Current.regionList.Add(home);
                        }
                    }
                    if(UserInfo.Current.regionList.Count== 0)
                    {
                        return "null";
                    }
                    //-------如果账号是首次登录
                    if (DB_ResidenceData.Instance.CurrentRegion == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.RegionID))
@@ -1781,6 +1789,56 @@
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDevcieList, requestJson);
        }
        /// <summary>
        /// 获取指定第三方品牌的绑定过的设备列表
        /// </summary>
        /// <param name="productPlatform"></param>
        /// <param name="productBrand"></param>
        /// <returns></returns>
        public ResponsePackNew Get3TyBrandBindDeviceList(string productPlatform, string productBrand)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("productPlatform", productPlatform);
            d.Add("productBrand", productBrand);
            d.Add("networkConfig", true);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDevcieList, requestJson);
        }
        /// <summary>
        /// 获取指定第三方品牌的设备列表
        /// </summary>
        /// <param name="productPlatform"></param>
        /// <param name="productBrand"></param>
        /// <returns></returns>
        public ResponsePackNew Get3TyBrandDeviceList(string productPlatform,string productBrand)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("categoryType", 1);
            d.Add("productPlatform", productPlatform);
            d.Add("productBrand", productBrand);
            d.Add("networkConfig", true);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Get3tyBrandDevcieList, requestJson);
        }
        /// <summary>
        /// 获取设备详情
        /// </summary>
        /// <returns></returns>
        public ResponsePackNew GetDeviceInfo(string functionId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("deviceIds", new List<string>() { functionId });
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDevcieInfoList, requestJson);
        }
        /// <summary>
        /// 获取设备详情列表
        /// </summary>
        /// <returns></returns>
@@ -2167,11 +2225,25 @@
        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
        #region 可视对讲
        /// <summary>
        /// 检查住宅是否绑定丰林,并获取门口机列表
        /// </summary>
        /// <returns></returns>
        public ResponsePackNew CheckFlVideo()
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            var pack = HttpUtil.RequestHttpsPostFroHome( NewAPI.API_POST_FL_Check, requestJson);
            return pack;
        }
        #endregion
    }
}