From f788a1e320b8505435ed66e2456ddb2d0a838f76 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 19 十一月 2020 19:58:14 +0800
Subject: [PATCH] 2020-11-19 1.优化绑定和解绑页面。2.修改密码功能实现,UI界面实现,接口实现。

---
 HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs |   58 ++++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 40 insertions(+), 18 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs
index 5f4c407..2541d08 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs
@@ -29,6 +29,15 @@
         public bool isUnbind;
 
         /// <summary>
+        /// 
+        /// </summary>
+        Button btnTitle;
+        /// <summary>
+        /// 
+        /// </summary>
+        Button btnContent;
+
+        /// <summary>
         /// ChangeBindAccountPage
         /// </summary>
         public ChangeBindAccountPage()
@@ -42,7 +51,7 @@
         /// <param name="optionType">鎿嶄綔鐩爣绫诲瀷 1:閭锛�2:鎵嬫満</param>
         /// <param name="titleId"></param>
         /// <param name="contentTitleId"></param>
-        public void LoadPage(Action<string> act, int opt, int titleId, int contentTitleId)
+        public void LoadPage(Action<string> act, int opt, int titleId)
         {
             action = act;
             optionType = opt;
@@ -66,24 +75,24 @@
             };
             bodyView.AddChidren(rowView);
 
-            Button btnTitle = new Button()
+            btnTitle = new Button()
             {
                 X = Application.GetRealWidth(16),
                 Width = Application.GetRealWidth(180),
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextSize = CSS_FontSize.SubheadingFontSize,
                 TextAlignment = TextAlignment.CenterLeft,
-                TextID = contentTitleId,
+                //TextID = contentTitleId,
             };
             rowView.AddChidren(btnTitle);
 
-            Button btnContent = new Button()
+            btnContent = new Button()
             {
                 Width = Application.GetRealWidth(359),
                 TextColor = CSS_Color.PromptingColor1,
                 TextSize = CSS_FontSize.TextFontSize,
                 TextAlignment = TextAlignment.CenterRight,
-                Text = optionType == 1 ? MainPage.LoginUser.userEmailInfo : MainPage.LoginUser.userMobileInfo,
+                //Text = optionType == 1 ? MainPage.LoginUser.userEmailInfo : MainPage.LoginUser.userMobileInfo,
             };
             rowView.AddChidren(btnContent);
 
@@ -105,6 +114,8 @@
             };
             bodyView.AddChidren(btnChangeBind);
 
+
+
             //鍚屾椂缁戝畾閭鎴栬�呮墜鏈烘墠鏄剧ず"鏇存崲楠岃瘉鏂瑰紡"
             if (!string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo) && !string.IsNullOrEmpty(MainPage.LoginUser.userEmailInfo))
             {
@@ -124,8 +135,27 @@
                 LoadEvent_ChangeVerificationMethod(btnChangeGetVer, btnTitle, btnContent);
             }
 
-
+            SetContentTitleId();
             LoadEvent_GetVerification(btnChangeBind, titleId);
+        }
+
+        /// <summary>
+        /// 璁剧疆鎸夐挳鎻愮ず鏂囧瓧
+        /// 淇敼缁戝畾鏃舵彁绀猴細鎵嬫満楠岃瘉銆侀偖绠遍獙璇�
+        /// 瑙g粦鏃舵彁绀猴細褰撳墠鎵嬫満鎵嬫満鍙风爜銆佸綋鍓嶉偖绠卞湴鍧�
+        /// </summary>
+        void SetContentTitleId()
+        {
+            if (optionType == 2)
+            {
+                btnTitle.TextID = isUnbind ? StringId.CurPhone : StringId.PhoneNumberVerification;
+                btnContent.Text = MainPage.LoginUser.userMobileInfo;
+            }
+            else
+            {
+                btnTitle.TextID = isUnbind ? StringId.CurrentEmail : StringId.EmailVerification;
+                btnContent.Text = MainPage.LoginUser.userEmailInfo;
+            }
         }
     }
 
@@ -140,16 +170,7 @@
             btn.MouseUpEventHandler = (sender, e) =>
             {
                 optionType = optionType == 1 ? 2 : 1;
-                if (optionType == 2)
-                {
-                    btnTitle.TextID = StringId.CurPhone;
-                    btnContent.Text = MainPage.LoginUser.userMobileInfo;
-                }
-                else
-                {
-                    btnTitle.TextID = StringId.CurrentEmail;
-                    btnContent.Text = MainPage.LoginUser.userEmailInfo;
-                }
+                SetContentTitleId();
             };
         }
 
@@ -218,10 +239,11 @@
                             });
                         }
 
-                    }) { IsBackground = true }.Start();
+                    })
+                    { IsBackground = true }.Start();
                 }
 
-               
+
             };
         }
     }

--
Gitblit v1.8.0