From 0138387222867fb6259599959772f38f69863404 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期一, 23 十一月 2020 20:05:38 +0800
Subject: [PATCH] 2020-11-23 1.检测更新Dialog实现。2.新绑定手机号增加国家区域选择UI

---
 HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs |  135 ++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 127 insertions(+), 8 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs
index 494fc3f..9de0907 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs
@@ -57,7 +57,7 @@
             if (isModifyBind)
             {
                 //淇敼缁戝畾
-                titleId = isPhone ? StringId.ModifyBindingPhone : StringId.ModifyBindingEmail;
+                titleId = isPhone ? StringId.EntryNewPhone : StringId.EntryNewEmail;
             }
             else
             {
@@ -65,20 +65,59 @@
                 titleId = isPhone ? StringId.BoundMobileInfo : StringId.BoundEmailInfo;
             }
          
-            
 
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
             new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
 
+            if (isPhone)
+            {
+                AddPhoneFrameLayout();
+            }
+            else
+            {
+                AddEmailFrameLayout();
+            }
+
+            //鐐瑰嚮鑾峰彇楠岃瘉鐮�
+            LoadEvent_GetVerification(btnBind);
+           
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        void AddPhoneFrameLayout() {
+            #region 濡傛灉鏄墜鏈�
+            //鎵嬫満鍥藉鍖哄彿閫夋嫨鎸夐挳
+            ListCellView codeView = new ListCellView() {
+                Y = Application.GetRealHeight(64),
+            };
+            bodyView.AddChidren(codeView);
+            //璺宠浆鍥藉鍖哄彿閫夋嫨鐣岄潰
+            Action selectAction = () =>
+            {
+                JLCountrycode.CountryCodeView.Current.Show((countryName, code) => {
+                    if (!string.IsNullOrEmpty(code))
+                    {
+                        phoneZoneCode = code;
+                        codeView.btnSubtitle.Text = "+" + phoneZoneCode;
+                    }
+                });
+            };
+            codeView.goAction = selectAction;
+            codeView.btnTilte.Text = Language.StringByID(StringId.CountryOrRegion);
+            codeView.btnSubtitle.Text = "+" + phoneZoneCode;
+
+            //鎵嬫満鍙疯緭鍏ユ
             FrameLayout rowView = new FrameLayout()
             {
-                Y = Application.GetRealHeight(72),
+                Y = codeView.Bottom,
                 Height = Application.GetRealHeight(50),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
             };
             bodyView.AddChidren(rowView);
 
-            //缁戝畾閭鎴栬�呯粦瀹氭墜鏈哄彿
+            //缁戝畾鎵嬫満鍙�
             Button btnTitle = new Button()
             {
                 X = Application.GetRealWidth(16),
@@ -117,11 +156,65 @@
                 BorderWidth = 0,
             };
             bodyView.AddChidren(btnBind);
-
-            //鐐瑰嚮鑾峰彇楠岃瘉鐮�
-            LoadEvent_GetVerification(btnBind);
-           
+            #endregion
         }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        void AddEmailFrameLayout()
+        {
+            #region 濡傛灉鏄偖绠�
+            FrameLayout rowView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(72),
+                Height = Application.GetRealHeight(50),
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+            };
+            bodyView.AddChidren(rowView);
+
+            //缁戝畾閭
+            Button btnTitle = new Button()
+            {
+                X = Application.GetRealWidth(16),
+                Width = Application.GetRealWidth(180),
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextID = titleId,
+            };
+            rowView.AddChidren(btnTitle);
+
+            etContent = new EditText()
+            {
+                Width = Application.GetRealWidth(359),
+                TextColor = CSS_Color.PromptingColor1,
+                TextSize = CSS_FontSize.TextFontSize,
+                TextAlignment = TextAlignment.CenterRight,
+                Foucs = true
+            };
+            rowView.AddChidren(etContent);
+
+            btnBind = new Button()
+            {
+                Y = Application.GetRealHeight(213),
+                Gravity = Gravity.CenterHorizontal,
+                Width = Application.GetRealWidth(220),
+                Height = Application.GetRealHeight(44),
+                BackgroundColor = CSS_Color.MainColor,
+                TextAlignment = TextAlignment.Center,
+                TextColor = CSS_Color.MainBackgroundColor,
+                TextID = StringId.GetVerificationCode,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                IsBold = true,
+                Radius = (uint)Application.GetRealWidth(22),
+                BorderColor = 0x00000000,
+                BorderWidth = 0,
+            };
+            bodyView.AddChidren(btnBind);
+            #endregion
+        }
+
     }
 
 
@@ -139,6 +232,32 @@
                 {
                     Application.HideSoftInput();
                     var account = etContent.Text.Trim();
+
+                    //濡傛灉鏄崲缁戞娴嬫槸鍚︾浉鍚屽笎鍙�
+                    if (isModifyBind)
+                    {
+                        if (isPhone)
+                        {
+                            if(account == UserInfo.Current.userMobileInfo)
+                            {
+                                //鎻愮ず鎹㈢粦甯愬彿鐩稿悓
+                                Utlis.ShowTip(Language.StringByID(StringId.EntryNewPhone));
+                                return;
+                            }
+                        }
+                        else
+                        {
+                            if (account == UserInfo.Current.userEmailInfo)
+                            {
+                                //鎻愮ず鎹㈢粦甯愬彿鐩稿悓
+                                Utlis.ShowTip(Language.StringByID(StringId.EntryNewEmail));
+                                return;
+                            }
+
+                        }
+                    }
+
+
                     #region 姝e垯琛ㄨ揪寮�
                     //1.妫�娴嬭处鍙锋槸鍚﹀悎娉�
                     if (!isPhone)

--
Gitblit v1.8.0