mac
2024-07-25 f9181a9c8125136f597add7c30cb2ff508d54ba7
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFaceManagementPage.cs
@@ -29,12 +29,14 @@
        public void LoadPage()
        {
            bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
            new TopViewDiv(bodyView, memberInfo.nickName).LoadTopView();
            var topView = new TopViewDiv(bodyView, memberInfo.nickName);
            topView.maginY = 10;
            topView.LoadTopView();
            #region 人脸管理
            var btnMemberFaceTitle = new Button()
            {
                Y = Application.GetRealHeight(80),
                Y = Application.GetRealHeight(80+10),
                X = Application.GetRealWidth(16),
                Height = Application.GetRealHeight(32),
                TextColor = CSS_Color.FirstLevelTitleColor,
@@ -109,7 +111,7 @@
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.TextualColor,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                    Text = "    为保护您的个人隐私权益,特向您通知并申请明确同意授权。请你仔细阅读",
                    TextID = StringId.FaceProTipText1,
                    IsMoreLines = true,
                };
                contentView.AddChidren(btnMsg);
@@ -123,9 +125,10 @@
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.MainColor,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                    Text = "    《On Pro人脸信息采集协议》",
                    TextID = StringId.FaceProTipText2,
                    IsMoreLines = true,
                };
                contentView.AddChidren(btnMsg1);
                Button btnMsg2 = new Button()
@@ -137,7 +140,7 @@
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.TextualColor,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                    Text = "    若同意该协议,请点击【同意】按键,表示您已经理解并同意人脸信息采集协议。",
                    TextID = StringId.FaceProTipText3,
                    IsMoreLines = true,
                };
                contentView.AddChidren(btnMsg2);
@@ -184,22 +187,22 @@
                btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), mRectCornerID);
                dialog.Show();
                btnCancel.MouseUpEventHandler += (sender, e) =>
                btnCancel.MouseUpEventHandler += (sender2, e2) =>
                {
                    dialog.Close();
                };
                btnMsg1.MouseUpEventHandler += (sender, e) =>
                btnMsg1.MouseUpEventHandler += (sender2, e2) =>
                {
                    string url = "https://developer.hdlcontrol.com/人脸信息采集协议.html";
                    string url = "https://developer.hdlcontrol.com/HDLFaceProtocol.html";
                    if (Language.CurrentLanguage != "Chinese")
                    {
                        url = "https://developer.hdlcontrol.com/Face information collection protocol.html";
                    }
                    new WebViewDialog().LoadPage("人脸信息采集协议", url);
                    new WebViewDialog().LoadPage(Language.StringByID(StringId.GetFaceProtocol), url);
                    dialog.Close();
                };
                btnConfirm.MouseUpEventHandler = (sender, e) =>
                btnConfirm.MouseUpEventHandler = (sender2, e2) =>
                {
                    dialog.Close();
                    OnAppConfig.Instance.FaceManagementTip = true;
@@ -220,7 +223,7 @@
                Radius = (uint)Application.GetRealWidth(22),
                BorderWidth = 0,
                BorderColor = 0x00000000,
                BackgroundColor = CSS_Color.WarningColor,
                BackgroundColor = 0xFFFF7272,
                TextColor = CSS_Color.MainBackgroundColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                IsBold = true,
@@ -243,6 +246,7 @@
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    memberInfo.userFaceUrl = "";
                                    btnAddFace.ImageBytes = null;
                                    btnAddFace.UnSelectedImagePath = "PersonalCenter/FacePassage/FaceIcon.png";
                                    btnDeleteFaceDate.Enable = btnDeleteFaceDate.Visible = false;
@@ -572,6 +576,11 @@
                        var pack = new HttpServerRequest().UpdataMemberFace(memberInfo.id, base64string);
                        if (pack != null)
                        {
                            var data = Newtonsoft.Json.JsonConvert.DeserializeObject<System.Collections.Generic.Dictionary<string,string>>(pack.Data.ToString());
                            if(data!= null)
                            {
                                data.TryGetValue("userFace",out memberInfo.userFaceUrl);
                            }
                            Utlis.WriteLine("上传结果:" + pack.message);
                            if(pack.Code == StateCode.SUCCESS)
                            {