From ed3bfb7462d44747230437717e8673a5192f833f Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期一, 30 十一月 2020 20:34:51 +0800 Subject: [PATCH] 2020-11-30-2 --- HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/AccountBindInfoPage.cs | 45 +++++++++++++-------------------------------- 1 files changed, 13 insertions(+), 32 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/AccountBindInfoPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/AccountBindInfoPage.cs index 331dc4a..d1a0a8d 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/AccountBindInfoPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/AccountBindInfoPage.cs @@ -4,20 +4,10 @@ namespace HDL_ON.UI { - /// <summary> - /// 宸茬粦瀹氭墜鏈烘垨鑰呴偖绠辩殑椤甸潰 - /// </summary> public partial class AccountBindInfoPage : FrameLayout { - /// <summary> - /// - /// </summary> FrameLayout bodyView; - /// <summary> - /// - /// </summary> Action<string> action; - /// <summary> /// 淇淇℃伅鐨勭被鍨� /// 1:閭锛�2:鎵嬫満 @@ -27,10 +17,6 @@ /// 鐣岄潰鏍囬 /// </summary> int titleId; - - /// <summary> - /// - /// </summary> public AccountBindInfoPage() { bodyView = this; @@ -41,7 +27,7 @@ /// </summary> /// <param name="act">鍒锋柊缁戝畾淇℃伅鏂规硶</param> /// <param name="option">淇淇℃伅鐨勭被鍨�:1:閭锛�2:鎵嬫満</param> - public void LoadPage(Action<string> act, int ot, int tId) + public void LoadPage(Action<string> act,int ot,int tId) { action = act; optionType = ot; @@ -64,7 +50,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.SubheadingFontSize, TextAlignment = TextAlignment.CenterLeft, - TextID = optionType == 1 ? StringId.CurrentEmail : StringId.CurPhone, + TextID = optionType == 1 ? StringId.CurrentEmail : StringId.CurPhone, }; rowView.AddChidren(btnTitle); @@ -74,7 +60,7 @@ TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.TextFontSize, TextAlignment = TextAlignment.CenterRight, - Text = optionType == 1 ? UserInfo.Current.userEmailInfo : UserInfo.Current.userMobileInfo, + Text = optionType == 1 ? MainPage.LoginUser.userEmailInfo : MainPage.LoginUser.userMobileInfo, }; rowView.AddChidren(btnContent); @@ -83,7 +69,7 @@ Y = Application.GetRealHeight(213), Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(220), - Height = Application.GetRealWidth(44), + Height = Application.GetRealHeight(44), BackgroundColor = CSS_Color.MainColor, TextAlignment = TextAlignment.Center, TextColor = CSS_Color.MainBackgroundColor, @@ -96,8 +82,7 @@ }; bodyView.AddChidren(btnChangeBind); - //鍚屾椂缁戝畾閭鎴栬�呮墜鏈烘墠鏄剧ず"鏇存崲楠岃瘉鏂瑰紡" - if (!string.IsNullOrEmpty( UserInfo.Current.userMobileInfo) && !string.IsNullOrEmpty( UserInfo.Current.userEmailInfo)) + if( (!string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo) && optionType == 1) || (!string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo) && optionType == 2)) { Button btnUnbind = new Button() { @@ -126,18 +111,16 @@ /// </summary> void LoadEvent_SkipChangeBandAccountInfo(Button button) { - EventHandler<MouseEventArgs> eventHandler = (sender, e) => - { + EventHandler<MouseEventArgs> eventHandler = (sender, e) => { var cbe = new ChangeBindAccountPage(); - cbe.IsUnbind = false; MainPage.BasePageView.AddChidren(cbe); if (optionType == 1) { - cbe.LoadPage(action, optionType, StringId.ModifyBindingEmail); + cbe.LoadPage(action, optionType, StringId.ModifyBindingEmail, StringId.CurrentEmail); } - else if (optionType == 2) + else if(optionType == 2) { - cbe.LoadPage(action, optionType, StringId.ModifyBindingPhone); + cbe.LoadPage(action, optionType, StringId.ModifyBindingPhone, StringId.CurPhone); } MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; @@ -149,18 +132,16 @@ /// </summary> void LoadEvent_SkipDelBandAccountInfo(Button button) { - EventHandler<MouseEventArgs> eventHandler = (sender, e) => - { + EventHandler<MouseEventArgs> eventHandler = (sender, e) => { var cbe = new ChangeBindAccountPage(); - cbe.IsUnbind = true;//鏄惁涓鸿В缁戞爣璁� MainPage.BasePageView.AddChidren(cbe); if (optionType == 1) { - cbe.LoadPage(action, optionType, StringId.UnbindEmail); + cbe.LoadPage(action, optionType, StringId.UnbindEmail, StringId.CurrentEmail); } - else if (optionType == 2) + else if(optionType == 2) { - cbe.LoadPage(action, optionType, StringId.UnbindPhone); + cbe.LoadPage(action, optionType, StringId.UnbindPhone, StringId.CurPhone); } MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; -- Gitblit v1.8.0