From 7153e420d66bce0a06b7e972ac3a5c34197fa2e5 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 18 十一月 2020 20:02:13 +0800 Subject: [PATCH] 2020-11-18 1.修改完善手机绑定和解绑。 --- HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindVerificationCodePage.cs | 103 ++++++++++++++++++++++++++++++++------------------- 1 files changed, 64 insertions(+), 39 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindVerificationCodePage.cs similarity index 91% rename from HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs rename to HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindVerificationCodePage.cs index 5744a72..09df67e 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindVerificationCodePage.cs @@ -6,7 +6,10 @@ namespace HDL_ON.UI { - public partial class VerificationCodePage :FrameLayout + /// <summary> + /// 淇敼缁戝畾鎴栬�呰В缁�--楠岃瘉鐮侀獙璇侀〉闈� + /// </summary> + public partial class ChangeBindVerificationCodePage : FrameLayout { FrameLayout bodyView; @@ -33,6 +36,10 @@ Button btnResend; Action<string> action; + + /// <summary> + /// + /// </summary> int titleId; /// <summary> @@ -43,7 +50,16 @@ /// 鍊掕鏃舵椂闂� /// </summary> int time = 0; - public VerificationCodePage() + + /// <summary> + /// 鏄惁涓鸿В缁戦獙璇� + /// </summary> + public bool isUnbind; + + /// <summary> + /// + /// </summary> + public ChangeBindVerificationCodePage() { bodyView = this; } @@ -54,14 +70,15 @@ /// <param name="tId">椤甸潰鏍囬</param> /// <param name="ot">鎿嶄綔绫诲瀷1:閭锛�2:鎵嬫満</param> /// <param name="time">鍊掕鏃舵椂闂�</param> - public void LoadPage(Action<string> act,int tId,int ot,int t) + public void LoadPage(Action<string> act, int tId, int ot, int t) { action = act; titleId = tId; bodyView.BackgroundColor = CSS_Color.BackgroundColor; optionType = ot; time = t; - Action backAction = () => { + Action backAction = () => + { Application.HideSoftInput(); }; new TopViewDiv(bodyView, Language.StringByID(tId)).LoadTopView(backAction); @@ -260,14 +277,15 @@ //--------------------------------------------- - public partial class VerificationCodePage + public partial class ChangeBindVerificationCodePage { /// <summary> /// 楠岃瘉鐮佽緭鍏ュ彉鍖栦簨浠� /// </summary> void LoadEvent_VerificationEntryEvent() { - EventHandler<MouseEventArgs> clickEvent = (sender, e) => { + EventHandler<MouseEventArgs> clickEvent = (sender, e) => + { et.Foucs = true; var etCode = et.Text; switch (etCode.Length) @@ -365,7 +383,8 @@ btnNum5.MouseUpEventHandler = clickEvent; btnNum6.MouseUpEventHandler = clickEvent; - et.TextChangeEventHandler = (sender, e) => { + et.TextChangeEventHandler = (sender, e) => + { var etCode = et.Text; switch (etCode.Length) { @@ -492,7 +511,7 @@ }); var verAccount = optionType == 1 ? MainPage.LoginUser.userEmailInfo : MainPage.LoginUser.userMobileInfo; var isPhone = optionType == 2; - var resultObj = new HttpServerRequest().ValidatorCode(VerifyType.REGISTER_USER_SYSTEM, verAccount, etCode, isPhone); + var resultObj = new HttpServerRequest().ValidatorCode(VerifyType.SENSITIVE_DATA, verAccount, etCode, isPhone); if (resultObj.Code == StateCode.SUCCESS) { result = true; @@ -517,6 +536,16 @@ { MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent(); //MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 1); + //if (isUnbind) + //{ + // //褰撳墠涓鸿В缁戦獙璇� + + //} + //else + //{ + + //} + if (titleId == StringId.ModifyBindingEmail) { LoadEvent_SkipBindAccountInfoPage(StringId.BindEmail); @@ -530,7 +559,7 @@ var account = ""; new Thread(() => { - var result2 = new DAL.Server.HttpServerRequest().BindAccount(account); + var result2 = new DAL.Server.HttpServerRequest().UnBindAccount(false); if (result2 == StateCode.SUCCESS) { Application.RunOnMainThread(() => @@ -549,15 +578,8 @@ } else { - Application.RunOnMainThread(() => - { - new Tip() - { - CloseTime = 1, - Direction = AMPopTipDirection.None, - Text = Language.StringByID(StringId.OperationFailed), - }.Show(bodyView); - }); + //澶辫触鎻愮ず + IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Member_UnbindWithAccount, result2); } }) { IsBackground = true }.Start(); @@ -567,12 +589,12 @@ var account = ""; new Thread(() => { - var result2 = new DAL.Server.HttpServerRequest().BindAccount(account); + var result2 = new DAL.Server.HttpServerRequest().UnBindAccount(true); if (result2 == StateCode.SUCCESS) { Application.RunOnMainThread(() => { - MainPage.LoginUser.userEmailInfo = account; + MainPage.LoginUser.userMobileInfo = account; var page = new OperationResultDisPalyPage(); page.Show(); page.LoadPage(true, Language.StringByID(StringId.UnbindPhone), Language.StringByID(StringId.UnbindPhoneSuccess), ""); @@ -586,15 +608,8 @@ } else { - Application.RunOnMainThread(() => - { - new Tip() - { - CloseTime = 1, - Direction = AMPopTipDirection.None, - Text = Language.StringByID(StringId.OperationFailed), - }.Show(bodyView); - }); + //澶辫触鎻愮ず + IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Member_UnbindWithAccount, result2); } }) { IsBackground = true }.Start(); @@ -621,14 +636,15 @@ time = 60; new Thread(() => { - if (optionType == 1) + //1.鑾峰彇楠岃瘉鐮�,閲囩敤鏁忔劅鏁版嵁楠岃瘉 + ResponsePackNew resultObj; + if (optionType == 1)//閭 { - var resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, MainPage.LoginUser.userEmailInfo); - + resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.SENSITIVE_DATA, MainPage.LoginUser.userEmailInfo); } - else if (optionType == 2) + else { - var resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, MainPage.LoginUser.userMobileInfo, true, MainPage.LoginUser.areaCode.ToString()); + resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.SENSITIVE_DATA, MainPage.LoginUser.userMobileInfo, true, MainPage.LoginUser.areaCode); } }) { IsBackground = true }.Start(); @@ -658,18 +674,27 @@ /// </summary> void LoadEvent_Resend() { - btnResend.MouseUpEventHandler = (sender, e) => { + btnResend.MouseUpEventHandler = (sender, e) => + { LoadThread_SendVerCode(); }; } /// <summary> - /// 璺宠浆缁戝畾璐﹀彿淇℃伅浜嬩欢 + /// 璺宠浆鏂扮粦瀹氳处鍙蜂俊鎭簨浠� /// </summary> void LoadEvent_SkipBindAccountInfoPage(int skipTid) { - var vcp = new BindAccountPage(); - MainPage.BasePageView.AddChidren(vcp); - vcp.LoadPage(action,skipTid); + //var vcp = new BindAccountPage(); + //MainPage.BasePageView.AddChidren(vcp); + //vcp.LoadPage(action, skipTid); + //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + + //鏄惁涓烘崲缁戞墜鏈� + var isPhone = optionType == 2; + //璺宠浆鏂扮粦瀹氶〉闈� + var aep = new NewBindAccountPage(); + MainPage.BasePageView.AddChidren(aep); + aep.LoadPage(action, isPhone, true); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; } } -- Gitblit v1.8.0