From eb51679c618d5027070fbd6f3c0519f0f17e7d7d Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期一, 23 十一月 2020 10:07:53 +0800 Subject: [PATCH] Merge branch 'CJL' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into CJL --- HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs | 159 +++++++++++++++++------------------------------------ 1 files changed, 51 insertions(+), 108 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs index 44b9478..2420826 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs @@ -6,40 +6,14 @@ namespace HDL_ON.UI { - /// <summary> - /// 淇敼缁戝畾鎴栬�呰В缁�--鍙戦�侀獙璇佺爜椤甸潰 - /// </summary> public partial class ChangeBindAccountPage : FrameLayout { - /// <summary> - /// - /// </summary> FrameLayout bodyView; - /// <summary> - /// - /// </summary> Action<string> action; /// <summary> /// 鎿嶄綔鐩爣绫诲瀷 1:閭锛�2:鎵嬫満 /// </summary> int optionType; - /// <summary> - /// 鏄惁涓鸿В缁戦獙璇� - /// </summary> - public bool isUnbind; - - /// <summary> - /// - /// </summary> - Button btnTitle; - /// <summary> - /// - /// </summary> - Button btnContent; - - /// <summary> - /// ChangeBindAccountPage - /// </summary> public ChangeBindAccountPage() { bodyView = this; @@ -51,18 +25,18 @@ /// <param name="optionType">鎿嶄綔鐩爣绫诲瀷 1:閭锛�2:鎵嬫満</param> /// <param name="titleId"></param> /// <param name="contentTitleId"></param> - public void LoadPage(Action<string> act, int opt, int titleId) + public void LoadPage(Action<string> act, int opt, int titleId, int contentTitleId) { action = act; optionType = opt; string account; if (optionType == 0) { - account = UserInfo.Current.userEmailInfo; + account = MainPage.LoginUser.userEmailInfo; } else { - account = UserInfo.Current.userMobileInfo; + account = MainPage.LoginUser.userMobileInfo; } bodyView.BackgroundColor = CSS_Color.BackgroundColor; new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView(); @@ -75,24 +49,24 @@ }; bodyView.AddChidren(rowView); - btnTitle = new Button() + 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); - btnContent = new Button() + Button btnContent = new Button() { Width = Application.GetRealWidth(359), 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); @@ -114,10 +88,7 @@ }; bodyView.AddChidren(btnChangeBind); - - - //鍚屾椂缁戝畾閭鎴栬�呮墜鏈烘墠鏄剧ず"鏇存崲楠岃瘉鏂瑰紡" - if (!string.IsNullOrEmpty( UserInfo.Current.userMobileInfo) && !string.IsNullOrEmpty( UserInfo.Current.userEmailInfo)) + if (!string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo)) { Button btnChangeGetVer = new Button() { @@ -135,27 +106,7 @@ 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 = UserInfo.Current.userMobileInfo; - } - else - { - btnTitle.TextID = isUnbind ? StringId.CurrentEmail : StringId.EmailVerification; - btnContent.Text = UserInfo.Current.userEmailInfo; - } } } @@ -170,7 +121,16 @@ btn.MouseUpEventHandler = (sender, e) => { optionType = optionType == 1 ? 2 : 1; - SetContentTitleId(); + if (optionType == 2) + { + btnTitle.TextID = StringId.CurPhone; + btnContent.Text = MainPage.LoginUser.userMobileInfo; + } + else + { + btnTitle.TextID = StringId.CurrentEmail; + btnContent.Text = MainPage.LoginUser.userEmailInfo; + } }; } @@ -186,64 +146,47 @@ { new Thread(() => { - //1.鑾峰彇楠岃瘉鐮�,閲囩敤鏁忔劅鏁版嵁楠岃瘉 - ResponsePackNew resultObj; - if (optionType == 1)//閭 + if (optionType == 1) { - resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.SENSITIVE_DATA, UserInfo.Current.userEmailInfo); - } - else - { - resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.SENSITIVE_DATA, UserInfo.Current.userMobileInfo, true, UserInfo.Current.areaCode); - } + var resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, MainPage.LoginUser.userEmailInfo); - if (resultObj.Code != StateCode.SUCCESS) - { - // 鎻愮ず閿欒 - IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); } - else + else if (optionType == 2) { - if (time == 0) - { - time = 60; - new Thread(() => - { - while (time > 0) - { - time--; - Application.RunOnMainThread(() => - { - button.Text = time.ToString() + "s"; - }); - Thread.Sleep(1000); - } - Application.RunOnMainThread(() => - { - button.IsSelected = true; - button.TextID = StringId.GetVerificationCode; - button.BackgroundColor = CSS_Color.MainColor; - time = 0; - }); - }) - { IsBackground = true }.Start(); - } - Application.RunOnMainThread(() => - { - button.BackgroundColor = CSS_Color.PromptingColor1; - var vcp = new ChangeBindVerificationCodePage(); - vcp.isUnbind = isUnbind; - MainPage.BasePageView.AddChidren(vcp); - vcp.LoadPage(action, titleId, optionType, time); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }); + var resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, MainPage.LoginUser.userMobileInfo, true, MainPage.LoginUser.areaCode.ToString()); } - }) { IsBackground = true }.Start(); } - - + if (time == 0) + { + time = 60; + new Thread(() => + { + while (time > 0) + { + time--; + Application.RunOnMainThread(() => + { + button.Text = time.ToString() + "s"; + }); + Thread.Sleep(1000); + } + Application.RunOnMainThread(() => + { + button.IsSelected = true; + button.TextID = StringId.GetVerificationCode; + button.BackgroundColor = CSS_Color.MainColor; + time = 0; + }); + }) + { IsBackground = true }.Start(); + } + button.BackgroundColor = CSS_Color.PromptingColor1; + var vcp = new VerificationCodePage(); + MainPage.BasePageView.AddChidren(vcp); + vcp.LoadPage(action, titleId, optionType, time); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; } } -- Gitblit v1.8.0