wxr
2021-12-15 e1a8f2f7e4d850beedeb1469610b878c1427e976
HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs
@@ -64,12 +64,25 @@
                Y = Application.GetRealWidth(184),
                Height = Application.GetRealWidth(28),
                TextAlignment = TextAlignment.Center,
                Text = "ON+",
                Text = "On Pro",
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.EmphasisFontSize_Secondary,
                IsBold = true,
            };
            bodyView.AddChidren(btnOnTitle);
#if DEBUG
            //btnOnIcon.MouseUpEventHandler += (sender, e) =>
            //{
            //    ESOnVideo.Current.Test();
            //};
            //btnOnTitle.MouseUpEventHandler += (sender, e) =>
            //{
            //    ESOnVideo.Current.Test(false);
            //};
#endif
            Button btnOnVersion = new Button()
            {
@@ -136,10 +149,40 @@
            {
                OpenUrl();
                //TestDDDDD();
                //HDLCommon.Current.CheckIfNeedForceUpdate();
            };
            versionUpdateView.GoAction = versionUpdateAction;
            #endregion
            #region 软件服务协议
            var serviceAgreementView = new ListCellView()
            {
                Y = versionUpdateView.Bottom,
            };
            bodyView.AddChidren(serviceAgreementView);
            serviceAgreementView.BtnTilte.TextID = StringId.UserAgreement;
            Action serviceAgreementAction = () => {
                string url = Constant.URL_USERAGREEMENT;
                string titleStr = Language.StringByID(StringId.UserAgreement);
                new WebViewDialog().LoadPageWithdrawalConsent(titleStr, url);
            };
            serviceAgreementView.GoAction = serviceAgreementAction;
            #endregion
            #region 用户信息保护协议
            var privacyPolicyView = new ListCellView()
            {
                Y = serviceAgreementView.Bottom,
            };
            bodyView.AddChidren(privacyPolicyView);
            privacyPolicyView.BtnTilte.TextID = StringId.PrivacyPolicy;
            Action privacyPolicyAction = () => {
                string url = Constant.URL_PRIVACYPOLICY;
                string titleStr = Language.StringByID(StringId.PrivacyPolicy);
                new WebViewDialog().LoadPageWithdrawalConsent(titleStr, url);
            };
            #endregion
            privacyPolicyView.GoAction = privacyPolicyAction;
            CheckIfNeedUpdateAsync();
        }
@@ -225,15 +268,15 @@
#else
            try
            {
                var versionResult = GetAndroidAppVersion();
                var versionResult = CheckAppVersion();
                if (versionResult == null)
                {
                    return "";
                }
                var newVersion = versionResult.NewVersion;
                var newVersion = versionResult.version;
                if (newVersion.CompareTo(MainPage.VersionString) > 0)
                {
                    newAppVersionUrl = versionResult.NewVersionUrl;
                    newAppVersionUrl = versionResult.androidUrl;
                    return newVersion;
                }
                return "";
@@ -269,17 +312,22 @@
            }
        }
#else
        //#else
#endif
        /// <summary>
        /// 获取 Android-APP 版本信息
        /// 检测新版本
        /// </summary>
        /// <returns>The https app version async.</returns>
        private APPVersion GetAndroidAppVersion()
        private AppVersionRes CheckAppVersion()
        {
            try
            {
                var result = new HttpServerRequest().GetAppVersion();
                var result = new HttpServerRequest().CheckAppVersion();
                if (result.Code == StateCode.SUCCESS)
                {
                    if (result.Data == null)
@@ -287,7 +335,7 @@
                        return null;
                    }
                    var responeData = Newtonsoft.Json.JsonConvert.DeserializeObject<APPVersion>(result.Data.ToString());
                    var responeData = Newtonsoft.Json.JsonConvert.DeserializeObject<AppVersionRes>(result.Data.ToString());
                    return responeData;
                }
                return null;
@@ -298,15 +346,12 @@
            }
        }
#endif
        int updateType = 0;
        void TestDDDDD()
        {
            updateType = 1;
            ForceUpdateInfo forceUpdateInfo = new ForceUpdateInfo()
            UpdateDialogInfo forceUpdateInfo = new UpdateDialogInfo()
            {
                UpdateType = updateType,
                NewVersionUrl = Constant.URL_APPSTORE,