From 2bec9c838d2d688025698de8ec1de401ffd7dd1f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 11 八月 2020 14:13:55 +0800 Subject: [PATCH] 20200811 --- HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs | 85 ++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 81 insertions(+), 4 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs index bce0ff1..f007f98 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs @@ -34,16 +34,22 @@ Action<string> action; int titleId; + /// <summary> + /// 鎿嶄綔鐩爣绫诲瀷 1:閭锛�2:鎵嬫満 + /// </summary> + int optionType; + public VerificationCodePage() { bodyView = this; } - public void LoadPage(Action<string> act,int tId) + public void LoadPage(Action<string> act,int tId,int ot) { action = act; titleId = tId; bodyView.BackgroundColor = CSS_Color.BackgroundColor; + optionType = ot; new TopViewDiv(bodyView, Language.StringByID(tId)).LoadTopView(); Button btnTip = new Button() @@ -75,9 +81,10 @@ X = Application.GetRealWidth(24), Y = btnNum1.Bottom, Width = Application.GetRealWidth(48), - Height = Application.GetRealHeight(1), + Height = Application.GetRealHeight(2), BackgroundColor = CSS_Color.PromptingColor2, SelectedBackgroundColor = CSS_Color.MainColor, + IsSelected = true }; bodyView.AddChidren(btnNum1Line); @@ -361,6 +368,12 @@ btnNum4Line.Height = Application.GetRealHeight(1); btnNum5Line.Height = Application.GetRealHeight(1); btnNum6Line.Height = Application.GetRealHeight(1); + btnNum1Line.Text = ""; + btnNum2Line.Text = ""; + btnNum3Line.Text = ""; + btnNum4Line.Text = ""; + btnNum5Line.Text = ""; + btnNum6Line.Text = ""; break; case 1: btnNum2Line.IsSelected = true; @@ -376,6 +389,11 @@ btnNum4Line.Height = Application.GetRealHeight(1); btnNum5Line.Height = Application.GetRealHeight(1); btnNum6Line.Height = Application.GetRealHeight(1); + btnNum2Line.Text = ""; + btnNum3Line.Text = ""; + btnNum4Line.Text = ""; + btnNum5Line.Text = ""; + btnNum6Line.Text = ""; break; case 2: btnNum3Line.IsSelected = true; @@ -391,6 +409,10 @@ btnNum4Line.Height = Application.GetRealHeight(1); btnNum5Line.Height = Application.GetRealHeight(1); btnNum6Line.Height = Application.GetRealHeight(1); + btnNum3Line.Text = ""; + btnNum4Line.Text = ""; + btnNum5Line.Text = ""; + btnNum6Line.Text = ""; break; case 3: btnNum4Line.IsSelected = true; @@ -406,6 +428,9 @@ btnNum4Line.Height = Application.GetRealHeight(2); btnNum5Line.Height = Application.GetRealHeight(1); btnNum6Line.Height = Application.GetRealHeight(1); + btnNum4Line.Text = ""; + btnNum5Line.Text = ""; + btnNum6Line.Text = ""; break; case 4: btnNum5Line.IsSelected = true; @@ -421,6 +446,8 @@ btnNum4Line.Height = Application.GetRealHeight(1); btnNum5Line.Height = Application.GetRealHeight(2); btnNum6Line.Height = Application.GetRealHeight(1); + btnNum5Line.Text = ""; + btnNum6Line.Text = ""; break; case 5: btnNum6Line.IsSelected = true; @@ -436,6 +463,7 @@ btnNum4Line.Height = Application.GetRealHeight(1); btnNum5Line.Height = Application.GetRealHeight(1); btnNum6Line.Height = Application.GetRealHeight(2); + btnNum6Line.Text = ""; break; case 6: btnNum6.Text = etCode.Substring(5, 1); @@ -519,7 +547,6 @@ for (int i = 0; i < 2; i++) { MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent(); - //MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 1); } action(account); }); @@ -539,6 +566,44 @@ }) { IsBackground = true }.Start(); } + else if (titleId == StringId.UnbindPhone) + { + var account = ""; + new Thread(() => + { + var result2 = new DAL.Server.HttpServerRequest().BindAccount(account); + if (result2 == "SUCCESS") + { + Application.RunOnMainThread(() => + { + MainPage.LoginUser.userEmailInfo = account; + var page = new OperationResultDisPalyPage(); + page.Show(); + page.LoadPage(true, Language.StringByID(StringId.UnbindPhone), Language.StringByID(StringId.UnbindPhoneSuccess), ""); + + for (int i = 0; i < 2; i++) + { + MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent(); + } + action(account); + }); + } + else + { + Application.RunOnMainThread(() => + { + new Tip() + { + CloseTime = 3, + Direction = AMPopTipDirection.None, + Text = Language.StringByID(StringId.OperationFailed), + }.Show(bodyView); + }); + } + }) + { IsBackground = true }.Start(); + + } }); } }) @@ -555,6 +620,18 @@ { btnResend.IsSelected = false; int time = 60; + new Thread(() => + { + if (optionType == 1) + { + var result = new DAL.Server.HttpServerRequest().GetLoginVerCode(MainPage.LoginUser.userEmailInfo); + } + else if (optionType == 2) + { + var result = new DAL.Server.HttpServerRequest().GetLoginVerCode(MainPage.LoginUser.userMobileInfo); + } + }) + { IsBackground = true }.Start(); new Thread(() => { while (time > 0) @@ -584,7 +661,7 @@ }; } /// <summary> - /// 璺宠浆缁戝畾璐﹀彿閭浜嬩欢 + /// 璺宠浆缁戝畾璐﹀彿淇℃伅浜嬩欢 /// </summary> void LoadEvent_SkipBindAccountInfoPage(int skipTid) { -- Gitblit v1.8.0