wxr
2022-08-02 66c72ee19b9e3543537621b8dd25685c9b5c03c4
RGB色盘优化,第三方平台对接功能
1个文件已添加
19个文件已修改
541 ■■■■ 已修改文件
HDL-ON_Android/Assets/Language.ini 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Mqtt/MqttClient.cs 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpServerRequest.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/Widget/WebViewDialog.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_AuthorizedPage.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_BrandFunctionListPage.cs 151 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_BrandListPage.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_SupportSpkListPage.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/iot_BindTipPage.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntents/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini
@@ -1600,7 +1600,7 @@
408=确认添加
 
409=功能品牌
410=你当前还未添加任何平台设备
410=没有您的设备
411=其他平台设备均由第三方服务商提供支持
412=添加
413=控制器未开启
@@ -1621,7 +1621,7 @@
428=负离子时间
429=小时
430=分钟
431=你当前还为添加任何平台设备
431=您当前还未添加任何平台设备
432=其他平台设备均由第三方服务商提供支持
433=水阀
434=定时开关
HDL-ON_iOS/Resources/Language.ini
@@ -1598,7 +1598,7 @@
408=确认添加
 
409=功能品牌
410=你当前还未添加任何平台设备
410=没有您的设备
411=其他平台设备均由第三方服务商提供支持
412=添加
413=控制器未开启
@@ -1619,7 +1619,7 @@
428=负离子时间
429=小时
430=分钟
431=你当前还为添加任何平台设备
431=您当前还未添加任何平台设备
432=其他平台设备均由第三方服务商提供支持
433=水阀
434=定时开关
HDL_ON/DAL/DriverLayer/Control.cs
@@ -1032,6 +1032,12 @@
        /// <param name="updateBytes"></param>
        public void UpdataFunctionStatus(string revString, byte[] usefulBytes,bool isCloudData = false)
        {
            ////test 云端连接成功时,不适用本地数据更新
            //if (Ins.GatewayOnline_Cloud && !isCloudData)
            //{
            //    return;
            //}
            var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<AlinkFunctionStatusObj>(revString);
            if (temp != null)
            {
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -205,6 +205,7 @@
                        QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce
                    };
                    #region 数据更新推送主题
                    //appHomeRefresh:住宅数据刷新通知--杨涛
                    var appHomeRefresh = new MqttTopicFilter()
@@ -273,6 +274,49 @@
                }
            }
        }
        /// <summary>
        /// 订阅绑定第三方iot账号结果
        /// </summary>
        /// <returns></returns>
        public static async Task<bool> SubscribeAsync3tyIotbind()
        {
            var topicFilter = new MqttTopicFilter()
            {
                Topic = $"/user/{UserInfo.Current.ID}/app/third/bind/send",
                QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce
            };
            var result = await RemoteMqttClient.SubscribeAsync(topicFilter);
            if (result.Items[0].ResultCode == MQTTnet.Client.Subscribing.MqttClientSubscribeResultCode.GrantedQoS0)
            {
                Utlis.WriteLine("订阅绑定第三方iot账号结果成功!");
                return true;
            }
            return false;
        }
        /// <summary>
        /// 取消订阅绑定第三方iot账号结果
        /// </summary>
        /// <returns></returns>
        public static async Task<bool> UnsubscribeAsync3tyIotbind()
        {
            string[] strs = new string[] {
                $"/user/{UserInfo.Current.ID}/app/third/bind/send"
            };
            var result = await RemoteMqttClient.UnsubscribeAsync(strs);
            if (result.Items[0].ReasonCode == MQTTnet.Client.Unsubscribing.MqttClientUnsubscribeResultCode.Success)
            {
                Utlis.WriteLine("取消订阅绑定第三方iot账号结果成功!");
                return true;
            }
            return false;
        }
        /// <summary>
        /// 绑定第三方平台接收回调事件
        /// </summary>
        public static Action Bind3tyIotAction;
        /// <summary>
        /// 启动远程Mqtt
@@ -352,8 +396,14 @@
                                    //新挤下线主题方案 收到挤下线主题
                                    ReceiveNotifySqueezeAsync(mMes);
                                }
                                //绑定第三方平台结果通知
                                else if(topic == $"/user/{UserInfo.Current.ID}/app/third/bind/send")
                                {
                                    var revString = Encoding.UTF8.GetString(e.ApplicationMessage.Payload);
                                    Bind3tyIotAction?.Invoke();
                                }
                                //设备在线离线状态推送
                                else if(topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/son/session/online")
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/son/session/online")
                                {
                                    try
                                    {
@@ -373,7 +423,7 @@
                                        //}
                                    }
                                    catch(Exception ex)
                                    catch (Exception ex)
                                    {
                                    }
@@ -504,7 +554,8 @@
                                                }
                                                HomePage.LoadEvent_RefreshSecurityStatus();
                                            }
                                        }catch(Exception ex)
                                        }
                                        catch (Exception ex)
                                        {
                                            MainPage.Log($"安防远程信息异常:{ex.Message}");
                                        }
@@ -516,29 +567,16 @@
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/property/send")
                                {
                                    if (Control.Ins.GatewayOnline_Local)//本地链接,除了涂鸦设备数据之外的云端数据不处理
                                    {
                                        if (FunctionList.List.OtherBrandFunction.Count == 0)
                                        {
                                            MainPage.Log($"A协议更新状态:本地链接,除了涂鸦设备数据之外的云端数据不处理...");
                                            return;
                                        }
                                        else
                                        {
                                            var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
                                            var revString = Encoding.UTF8.GetString(bytes);
                                            MainPage.Log($"mqtt 状态更新:{revString}");
                                            Control.Ins.UpdataFunctionStatus(revString, null, true);
                                            //Control.Ins.MsgInfoList.Add($"mqtt 状态更新:{revString}");
                                            //Control.Ins.MsgInfoList.Add(revString + "\r\n");
                                            //if (FunctionList.List.OtherBrandFunction.Find((obj) => obj.sid == updateTemp.sid) == null)
                                            //{
                                            //    return;
                                            //}
                                        }
                                    }
                                    var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
                                    var revString = Encoding.UTF8.GetString(bytes);
                                    MainPage.Log($"mqtt 状态更新:{revString}");
                                    Control.Ins.UpdataFunctionStatus(revString, null, true);
                                    //Control.Ins.MsgInfoList.Add($"mqtt 状态更新:{revString}");
                                    //Control.Ins.MsgInfoList.Add(revString + "\r\n");
                                    //if (FunctionList.List.OtherBrandFunction.Find((obj) => obj.sid == updateTemp.sid) == null)
                                    //{
                                    //    return;
                                    //}
                                }
                                //一端口数据解析
                                else
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -2664,16 +2664,30 @@
            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Get3tyIotFunction, requestJson);
            return pack;
        }
        /// <summary>
        /// 获取第三方平台支持的设备类型列表
        /// </summary>
        /// <returns></returns>
        public ResponsePackNew Get3tyIotSupportSpkList(string companyId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("companyId", companyId);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Get3tyIotFunction, requestJson);
            return pack;
        }
        /// <summary>
        /// 设置第三方设备绑定的住宅
        /// </summary>
        /// <returns></returns>
        public ResponsePackNew Set3tyIotFunctionToHouse(string deviceId,string homeId)
        public ResponsePackNew Set3tyIotFunctionToHouse(string deviceId,string homeId, string companyId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("deviceId", deviceId);
            d.Add("homeId", homeId);
            d.Add("companyId", companyId);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Setting3tyIotFunctionToHouse, requestJson);
HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,8 +18,8 @@
        /// 公共域名就近解析
        /// </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>
HDL_ON/DAL/Server/NewAPI.cs
@@ -620,7 +620,7 @@
        /// <summary>
        /// 获取第三方iot平台设备功能列表
        /// </summary>
        public const string Api_Post_Get3tyIotFunction = "/home-wisdom/app/open/discoveryDevice";
        public const string Api_Post_Get3tyIotFunction = "/home-wisdom/app/open/extDeviceList";
        /// <summary>
        /// 配置第三方iot平台设备功能到住宅
        /// </summary>
@@ -628,7 +628,7 @@
        /// <summary>
        /// 解绑第三方iot平台账号
        /// </summary>
        public const string Api_Post_Unbound3tyIotAccount = "/open-platform/tripartite/userUnbind";
        public const string Api_Post_Unbound3tyIotAccount = "/smart-open/open-platform/tripartite/userUnbind";
        #region ■  -- 红外宝接口___________________________
        /// <summary>
HDL_ON/Entity/Function/Function.cs
@@ -243,7 +243,30 @@
        /// <summary>
        /// 备注
        /// </summary>
        public string name;
        public string name = "";
        /// <summary>
        /// 设备绑定的homeId
        /// </summary>
        private string _homeId = "";
        public string homeId
        {
            get
            {
                if (string.IsNullOrEmpty(_homeId))
                {
                    return DB_ResidenceData.Instance.CurrentRegion.id;
                }
                else
                {
                    return _homeId;
                }
            }
            set
            {
                _homeId = value;
            }
        }
        /// <summary>
        /// 设备ID
        /// 云端负责生成
HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs
@@ -87,6 +87,8 @@
        /// 公司id
        /// </summary>
        public string companyId;
        public string clientId;
    }
    /// <summary>
HDL_ON/HDL_ON.projitems
@@ -511,6 +511,7 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\iot_BindTipPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\Iot_BrandFunctionListPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\Iot_AuthorizedPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\Iot_SupportSpkListPage.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
HDL_ON/UI/UI0-Public/Widget/WebViewDialog.cs
@@ -19,6 +19,9 @@
        /// </summary>
        public WebView mWebView;
        private Action closeAction;
        /// <summary>
        /// WebViewDialog
        /// </summary>
@@ -26,6 +29,14 @@
        {
            bodyView = new FrameLayout();
        }
        public WebViewDialog(Action action)
        {
            closeAction = action;
            bodyView = new FrameLayout();
        }
        /// <summary>
        /// 加载页面
@@ -34,7 +45,7 @@
        {
            bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
            this.AddChidren(bodyView);
            new TopViewDiv(this, bodyView, titleStr).LoadTopView();
            new TopViewDiv(this, bodyView, titleStr).LoadTopView(closeAction);
            //WebView
            mWebView = new WebView()
            {
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_AuthorizedPage.cs
@@ -11,11 +11,74 @@
        IntegratedBrand_Iot brand_Iot;
        public Iot_AuthorizedPage(IntegratedBrand_Iot brand)
        Action boudedAction;
        public Iot_AuthorizedPage(IntegratedBrand_Iot brand,Action action)
        {
            brand_Iot = brand;
            boudedAction = action;
        }
        public void LoadView()
        {
            string url = brand_Iot.authorizationUrl + $"?companyId={brand_Iot.companyId}&openUId={UserInfo.Current.ID}&client_id={brand_Iot.clientId}";
            var dd = new WebViewDialog(()=> {
                UnsubscribeAsync3tyIotbind();
            });
            dd.LoadPage("", url);
            DAL.Mqtt.MqttClient.Bind3tyIotAction = () => {
                UnsubscribeAsync3tyIotbind();
                Application.RunOnMainThread(() =>
                {
                    http.Search3tyIotDevice(brand_Iot.companyId);
                    boudedAction?.Invoke();
                    dd.Close();
                });
            };
            SubscribeAsync3tyIotbind();
        }
        /// <summary>
        /// 订阅绑定第三方iot账号结果
        /// </summary>
        private void SubscribeAsync3tyIotbind()
        {
            new System.Threading.Thread(async () =>
            {
                try
                {
                    var result = await DAL.Mqtt.MqttClient.SubscribeAsync3tyIotbind();
                }
                catch { }
                finally
                {
                }
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 取消订阅绑定第三方iot账号结果
        /// </summary>
        private void UnsubscribeAsync3tyIotbind()
        {
            new System.Threading.Thread(async () =>
            {
                try
                {
                    var result = await DAL.Mqtt.MqttClient.UnsubscribeAsync3tyIotbind();
                }
                catch { }
                finally
                {
                }
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 搜索第三方设备
        /// </summary>
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_BrandFunctionListPage.cs
@@ -8,8 +8,10 @@
{
    public class Iot_BrandFunctionListPage :FrameLayout
    {
        FrameLayout bodyView;
        FrameLayout contentView;
        IntegratedBrand_Iot brand_Iot;
@@ -36,7 +38,7 @@
                page.LoadPage(brand_Iot);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            }; 
            new TopViewDiv(bodyView, "品牌名称").LoadTopView_3tyIot(action);
            new TopViewDiv(bodyView, brand_Iot.brandName).LoadTopView_3tyIot(action);
            bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
@@ -65,16 +67,43 @@
            };
            bodyView.AddChidren(btnTipText);
            var contentView = new VerticalRefreshLayout()
            contentView = new FrameLayout()
            {
                Y = Application.GetRealHeight(150),
                Height = Application.GetRealHeight(573),
            };
            bodyView.AddChidren(contentView);
            LoadDeviceFunctionControlZone(contentView);
            var waitPage = new Loading();
            contentView.AddChidren(waitPage);
            waitPage.Start("");
            new System.Threading.Thread(() =>
            {
                try
                {
                    var pack = http.Get3tyIotDeviceFunctionList(brand_Iot.companyId);
                    if (pack != null)
                    {
                        if (pack.Code == StateCode.SUCCESS)
                        {
                            var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Function>>(pack.Data.ToString());
                            Application.RunOnMainThread(() =>
                            {
                                LoadDeviceFunctionControlZone(list);
                            });
                        }
                    }
                }
                catch { }
                finally
                {
                    Application.RunOnMainThread(() => {
                        waitPage.Hide();
                        waitPage.RemoveFromParent();
                    });
                }
            }) { IsBackground = true }.Start();
        }
@@ -82,26 +111,32 @@
        /// <summary>
        /// 加载设备功能显示区域
        /// </summary>
        void LoadDeviceFunctionControlZone(VerticalRefreshLayout deviceFunctionView)
        void LoadDeviceFunctionControlZone(List<Function> list)
        {
            contentView.RemoveAll();
            if (list.Count == 0)
            {
                NotListTipView();
                return;
            }
            VerticalScrolViewLayout deviceFunctionView = new VerticalScrolViewLayout();
            contentView.AddChidren(deviceFunctionView);
            #region ContextView
            var rowView = new FrameLayout();
            try
            {
                int index = 0;
                var list = new List<Function>();
                list.Add(new Function
                {
                    spk = SPK.AcStandard,
                    name = "空调"
                });
                list.Add(new Function
                {
                    spk = SPK.LightDimming,
                    name = "灯光"
                });
                foreach (var function in list)
                {
                    if(function.homeId != DB_ResidenceData.Instance.CurrentRegion.id && function.homeId != "0")
                    {
                        continue;
                    }
                    if (index % 2 == 0)
                    {
                        rowView = new FrameLayout()
@@ -143,24 +178,14 @@
                    var view = new FrameLayout();
                    deviceFunctionView.AddChidren(view);
                    var btnNoCollectionBg = new Button()
                    {
                        Y = Application.GetRealHeight(20),
                        Gravity = Gravity.CenterHorizontal,
                        Width = Application.GetRealWidth(180),
                        Height = Application.GetRealWidth(180),
                        Text = "没有任何设备"
                    };
                    view.AddChidren(btnNoCollectionBg);
                    var btnNoCollectionTip = new Button()
                    {
                        Height = Application.GetRealHeight(42),
                        Y = btnNoCollectionBg.Bottom,
                        Y = Application.GetRealHeight(100),
                        TextAlignment = TextAlignment.Center,
                        TextColor = CSS_Color.PromptingColor1,
                        TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                        TextID = StringId.TipNoFunctionCollcetion,
                        Text = "没有任何设备"
                    };
                    view.AddChidren(btnNoCollectionTip);
                }
@@ -215,20 +240,25 @@
                    function.collect = !function.collect;
                    if (function.collect)
                    {
                        btnName.IsSelected = btnIcon.IsSelected = btnBg.IsSelected = true;
                        var pack = http.Set3tyIotFunctionToHouse(function.deviceId, DB_ResidenceData.Instance.CurrentRegion.id);
                        var pack = http.Set3tyIotFunctionToHouse(function.deviceId, DB_ResidenceData.Instance.CurrentRegion.id,brand_Iot.companyId);
                        if (pack != null)
                        {
                            if(pack.Code == StateCode.SUCCESS)
                            {
                                btnName.IsSelected = btnIcon.IsSelected = btnBg.IsSelected = true;
                            }
                        }
                    }
                    else
                    {
                        btnName.IsSelected = btnIcon.IsSelected = btnBg.IsSelected = false;
                        var pack = http.Set3tyIotFunctionToHouse(function.deviceId, "0");
                        var pack = http.Set3tyIotFunctionToHouse(function.deviceId, "0", brand_Iot.companyId);
                        if (pack != null)
                        {
                            if (pack.Code == StateCode.SUCCESS)
                            {
                                btnName.IsSelected = btnIcon.IsSelected = btnBg.IsSelected = false;
                            }
                        }
                    }
@@ -242,6 +272,59 @@
        }
        void NotListTipView()
        {
            contentView.RemoveAll();
            var btnTip = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(88),
                Width = Application.GetRealWidth(180),
                Height = Application.GetRealWidth(180),
                UnSelectedImagePath = "TipNot.png",
            };
            contentView.AddChidren(btnTip);
            var btnTipText = new Button()
            {
                Y = Application.GetRealHeight(252),
                Height = Application.GetRealHeight(52),
                TextSize = CSS_FontSize.TextFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.Center,
                TextID = StringId.TipNotThirdPartyDevice,
            };
            contentView.AddChidren(btnTipText);
            var btnAdd = new Button()
            {
                Y = Application.GetRealHeight(400),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealWidth(44),
                BackgroundColor = CSS_Color.MainColor,
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.MainBackgroundColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                IsBold = true,
                Radius = (uint)Application.GetRealWidth(22),
                BorderColor = 0x00000000,
                BorderWidth = 0,
                Text = "查看设备支持范围"
            };
            contentView.AddChidren(btnAdd);
            btnAdd.MouseUpEventHandler = (sender, e) =>
            {
                //var page = new AddThirdPartyBrandListpage(brandList);
                //MainPage.BasePageView.AddChidren(page);
                //page.LoadPage();
                //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
        }
        HttpServerRequest http = new HttpServerRequest();
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_BrandListPage.cs
@@ -14,7 +14,7 @@
    {
        FrameLayout bodyView;
        VerticalRefreshLayout contentView;
        VerticalScrolViewLayout contentView;//VerticalRefreshLayout
        List<IntegratedBrand_Iot> brandList;
@@ -56,7 +56,7 @@
            };
            bodyView.AddChidren(btnTipText);
             
            contentView = new VerticalRefreshLayout()
            contentView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(150),
                Height = Application.GetRealHeight(573),
@@ -68,14 +68,11 @@
            GetBindList();
            contentView.BeginHeaderRefreshingAction = () =>
            {
                contentView.EndHeaderRefreshing();
                GetBindList();
            };
            LoadRow();
            //contentView.BeginHeaderRefreshingAction = () =>
            //{
            //    contentView.EndHeaderRefreshing();
            //    GetBindList();
            //};
        }
        /// <summary>
@@ -130,14 +127,12 @@
        void LoadRow()
        {
            contentView.RemoveAll();
            bool isFrist = true;
            brandList.Add(new IntegratedBrand_Iot
            {
                authBrandNameCn = "Test Hdl",
                authBrandNameEn = "Test Hdl",
                hasAuthorization = false
            });
            //brandList.Add(new IntegratedBrand_Iot
            //{
            //    authBrandNameCn = "Test Hdl",
            //    authBrandNameEn = "Test Hdl",
            //    hasAuthorization = false
            //});
            foreach (var brand in brandList)
            {
@@ -149,22 +144,15 @@
                };
                contentView.AddChidren(row);
                //if (isFrist)
                //{
                //    isFrist = false;
                //}
                //else
                Button btnLine = new Button()
                {
                    Button btnLine = new Button()
                    {
                        Y = Application.GetRealWidth(86),
                        Gravity = Gravity.CenterHorizontal,
                        Width = Application.GetRealWidth(343),
                        Height = 1,
                        BackgroundColor = CSS_Color.DividingLineColor,
                    };
                    row.AddChidren(btnLine);
                }
                    Y = Application.GetRealWidth(86),
                    Gravity = Gravity.CenterHorizontal,
                    Width = Application.GetRealWidth(343),
                    Height = 1,
                    BackgroundColor = CSS_Color.DividingLineColor,
                };
                row.AddChidren(btnLine);
                ImageView btnIcon = new ImageView()
                {
@@ -209,7 +197,7 @@
                };
                row.AddChidren(btnName);
                //下载第三方品牌icon
                //ImageUtlis.Current.Load3tyBrandIconImages(brand.brandName, brand.authrBandIconUrl, btnIcon);
                ImageUtlis.Current.Load3tyBrandIconImages(brand.brandName, brand.authrBandIconUrl, btnIcon);
                btnName.MouseUpEventHandler = (sender, e) => {
                    if (brand.hasAuthorization)
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_SupportSpkListPage.cs
New file
@@ -0,0 +1,26 @@
using System;
using HDL_ON.Entity;
using Shared;
namespace HDL_ON.UI
{
    /// <summary>
    /// 支持的第三方平台设备列表界面
    /// </summary>
    public class Iot_SupportSpkListPage : FrameLayout
    {
        private FrameLayout bodyView;
        IntegratedBrand_Iot brand_Iot;
        public Iot_SupportSpkListPage()
        {
            bodyView = this;
        }
        public void LoadPage()
        {
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/iot_BindTipPage.cs
@@ -139,14 +139,23 @@
            {
                btnComfirm.MouseUpEventHandler = (sender, e) =>
                {
                    brand_Iot.hasAuthorization = true;
                    boundAction?.Invoke();
                    this.RemoveFromParent();
                    var page = new Iot_BrandFunctionListPage(brand_Iot);
                    page.unboundAction = unboundAction;
                    MainPage.BasePageView.AddChidren(page);
                    page.LoadPage();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                    Action action = () => {
                        brand_Iot.hasAuthorization = true;
                        boundAction?.Invoke();
                        this.RemoveFromParent();
                        var page = new Iot_BrandFunctionListPage(brand_Iot);
                        page.unboundAction = unboundAction;
                        MainPage.BasePageView.AddChidren(page);
                        page.LoadPage();
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                    };
                    var page = new Iot_AuthorizedPage(brand_Iot,action);
                    page.LoadView();
                };
            }
            else
@@ -239,6 +248,11 @@
                                        });
                                    }
                                }
                                else
                                {
                                    dialog.Close();
                                    new Alert("", "操作失败", "").Show();
                                }
                            }
                            catch { }
                            finally
HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
@@ -174,20 +174,28 @@
            echartsView.AddChidren(myEchartsView_Pie);
            Dictionary<string, string> list = new Dictionary<string, string>();
            int count = 0;
            foreach(var ene in energyList)
            {
                if (count > 10)
                {
                    break;
                }
                double tt = 0;
                double.TryParse(ene.GetAttrState(FunctionAttributeKey.TotalElectricity), out tt);
                tt *= 100;//乘以100,小于1无法加载echart
                tt = Math.Round(tt, 2);
                if (list.ContainsKey(ene.name))
                string key = ene.name;
                if (list.ContainsKey(key))
                {
                    list.Add(ene.name + "1", tt.ToString());
                    list.Add(ene.name + DateTime.Now.ToLongTimeString(), tt.ToString());
                }
                else
                {
                    list.Add(ene.name, tt.ToString());
                }
                count++;
            }
            myEchartsView_Pie.ShowWithOption(new EchartsOption_Pie().InitDateJson(list));
@@ -219,6 +227,10 @@
            int index = 0;
            foreach (var energy in energyList)
            {
                if (index > 10)
                {
                    break;
                }
                EnergyRow(energy, energyListView, index);
                index++;
                new System.Threading.Thread(() =>
@@ -562,8 +574,14 @@
            double totalValue = 0;
            double realtimeValue = 0;
            Dictionary<string, string> list = new Dictionary<string, string>();//饼图数据
            int count = 0;
            foreach (var ene in bodyView.energyList)
            {
                if (count > 10)
                {
                    break;
                }
                count++;
                double power = 0.00;
                double.TryParse(ene.GetAttrState(FunctionAttributeKey.TotalElectricity), out power);
                power = Math.Round(power, 2);
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
@@ -157,6 +157,7 @@
            framePickerBack.Y = btnFromFoorAndRoom.Bottom + Application.GetRealHeight(1);
            framePickerBack.Width = Application.GetMinRealAverage(216);
            framePickerBack.Height = Application.GetMinRealAverage(216);
            //framePickerBack.BackgroundColor = 0xFFFF0000;
            controlView.AddChidren(framePickerBack);
            colorPicker = new ColorPicker()
@@ -177,10 +178,17 @@
            //};
            //白点控件
            this.btnWhiteRound = new Button();
            btnWhiteRound.Width = Application.GetRealWidth(24);
            btnWhiteRound.Height = Application.GetRealWidth(24);
            btnWhiteRound.UnSelectedImagePath = "FunctionIcon/Light/ColorWheelTip.png";
            var diameter = Application.GetRealWidth(12);
            this.btnWhiteRound = new Button()
            {
                Width = diameter,
                Height = diameter,
                Radius = (uint)Application.GetRealWidth(6),
                BorderWidth = (uint)Application.GetRealWidth(1),
                BorderColor = CSS_Color.MainBackgroundColor,
                Enable = false,
            };
            //btnWhiteRound.UnSelectedImagePath = "FunctionIcon/Light/ColorWheelTip.png";
            btnWhiteRound.Visible = false;
            framePickerBack.AddChidren(btnWhiteRound);
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
@@ -104,7 +104,7 @@
            //当前点击的【点】是否正确
            bool pointIsRight = false;
            //圆的半径(考虑边界,需要设置它的半径比较小一点)
            int circleR = colorPicker.Width / 2 - Application.GetRealWidth(12);
            int circleR = colorPicker.Width / 2 - Application.GetRealWidth(2);
            colorPicker.ColorChaged += (sender2, e2) => {
                if (function.trait_on_off.curValue.ToString() == "off" || pointIsRight == false)
SiriIntents/Server/HttpUtil.cs
@@ -16,8 +16,8 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </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>