wxr
2024-05-20 efcffde735fa65ae34bae0bcc86313b74ed0e36c
HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs
@@ -46,12 +46,15 @@
        /// </summary>
        public void LoadPage()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.About)).LoadTopView();
            var topView = new TopViewDiv(bodyView, Language.StringByID(StringId.About));
            topView.maginY = 10;
            topView.LoadTopView();
            this.BackgroundColor = CSS_Color.MainBackgroundColor;
            Button btnOnIcon = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealWidth(106),
                Y = Application.GetRealWidth(106+10),
                Width = Application.GetRealWidth(58),
                Height = Application.GetRealWidth(58),
                UnSelectedImagePath = "OnIcon.png",
@@ -94,6 +97,10 @@
                Text = Language.StringByID(StringId.VersionNumber) + " " + MainPage.VersionString,
            };
            bodyView.AddChidren(btnOnVersion);
            if(HttpUtil.GlobalRequestHttpsHost == "https://test-gz.hdlcontrol.com")
            {
                btnOnVersion.Text += "(Test Server)";
            }
            var lineView = new FrameLayout()
@@ -184,6 +191,43 @@
            #endregion
            privacyPolicyView.GoAction = privacyPolicyAction;
            CheckIfNeedUpdateAsync();
#if __IOS__
            #region 固件升级
            var firUpdateView = new ListCellView()
            {
                Y = privacyPolicyView.Bottom,
            };
            firUpdateView.BtnTilte.TextID = StringId.FirmwareUpdate;
            bodyView.AddChidren(firUpdateView);
            Action firmwareUpdateAction = () =>
            {
                var mPage = new HDL_ON.UI.UI2.PersonalCenter.AboutOn.FirmwareUpdateView();
                MainPage.BasePageView.AddChidren(mPage);
                mPage.ShowPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            firUpdateView.GoAction = firmwareUpdateAction;
            #endregion
            #region HomeKit支持说明
            var homeKitView = new ListCellView()
            {
                Y = firUpdateView.Bottom,
            };
            bodyView.AddChidren(homeKitView);
            homeKitView.BtnTilte.TextID = StringId.SupportHomeKitNotes;
            Action homeKitSupportViewAction = () => {
                var mPage = new HDL_ON.UI.UI2.PersonalCenter.AboutOn.SupportHomeKitNotesPage();
                MainPage.BasePageView.AddChidren(mPage);
                mPage.ShowPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            homeKitView.GoAction = homeKitSupportViewAction;
            #endregion
#endif
        }
@@ -192,14 +236,14 @@
        /// </summary>
        void OpenUrl()
        {
            if (!string.IsNullOrEmpty(newAppVersion))
            if (!string.IsNullOrEmpty(newAppVersion)&& newAppVersionUrl.Contains("http"))
            {
                HDLUtils.OpenUrl(newAppVersionUrl);
            }
            else
            {
                Utlis.ShowTip(Language.StringByID(StringId.IsLatestVersion));
            }
            //else
            //{
            //    Utlis.ShowTip(Language.StringByID(StringId.IsLatestVersion));
            //}
        }
        /// <summary>
@@ -276,7 +320,7 @@
                var newVersion = versionResult.version;
                if (newVersion.CompareTo(MainPage.VersionString) > 0)
                {
                    newAppVersionUrl = versionResult.androidUrl;
                    newAppVersionUrl = versionResult.packageUrl;
                    return newVersion;
                }
                return "";
@@ -323,7 +367,7 @@
        /// 检测新版本
        /// </summary>
        /// <returns>The https app version async.</returns>
        private AppVersionRes CheckAppVersion()
        private AppVersionResNew CheckAppVersion()
        {
            try
            {
@@ -335,7 +379,7 @@
                        return null;
                    }
                    var responeData = Newtonsoft.Json.JsonConvert.DeserializeObject<AppVersionRes>(result.Data.ToString());
                    var responeData = Newtonsoft.Json.JsonConvert.DeserializeObject<AppVersionResNew>(result.Data.ToString());
                    return responeData;
                }
                return null;