From c1547bfd3de3528fbadfd7b9154086a1f1c7ece2 Mon Sep 17 00:00:00 2001
From: lss <lsc@hdlchina.com.cn>
Date: 星期三, 15 六月 2022 13:03:59 +0800
Subject: [PATCH] 测试推送正常
---
ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs | 39 +++++++++++++++++++++++----------------
1 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs
index 2279789..c17e6e2 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs
@@ -99,7 +99,11 @@
btnCodeControl.FinishInputEvent += (value) =>
{
//鏍¢獙楠岃瘉鐮�
- this.CheckVerificationCode(value);
+ if (this.CheckVerificationCode(value) == false)
+ {
+ //娓呯┖楠岃瘉鐮�
+ btnCodeControl.ClearInputValue();
+ }
};
//楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
@@ -108,6 +112,7 @@
btnErrorMsg.TextAlignment = TextAlignment.Center;
btnErrorMsg.TextColor = 0xfff75858;
btnErrorMsg.TextID = R.MyInternationalizationString.uVerificationCodeErrorInputAgain;
+ btnErrorMsg.IsBold = true;
bodyFrameLayout.AddChidren(btnErrorMsg);
btnErrorMsg.Visible = false;
@@ -118,6 +123,8 @@
bodyFrameLayout.AddChidren(btnNext);
btnNext.ButtonClickEvent += (sender, e) =>
{
+ //娓呯┖杈撳叆鐨勫��
+ btnCodeControl.ClearInputValue();
//鍙戦�侀獙璇佺爜鍒版墜鏈�
this.SendCodeToPhone(btnNext);
};
@@ -130,11 +137,11 @@
/// <summary>
/// 鍙戦�侀獙璇佺爜鍒版墜鏈�
/// </summary>
- private async void SendCodeToPhone(BottomClickButton btnNext)
+ private void SendCodeToPhone(BottomClickButton btnNext)
{
var sendCodePra = new SendCodePra();
- bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/LoginSendVerCode", false, sendCodePra);
+ bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/LoginSendVerCode", false, sendCodePra);
if (flage == false)
{
return;
@@ -146,11 +153,11 @@
btnNext.CanClick = false;
//?s鍚庨噸鍙�
string repeat = Language.StringByID(R.MyInternationalizationString.RepeatSend1);
- //鏈夋晥鏃堕棿300绉�
- int waitime = 300;
+ //鏈夋晥鏃堕棿60绉�
+ int waitime = 60;
btnNext.Text = waitime + "s" + repeat;
- new System.Threading.Thread(() =>
+ HdlThreadLogic.Current.RunThread(() =>
{
while (this.Parent != null)
{
@@ -158,8 +165,7 @@
System.Threading.Thread.Sleep(1000);
if (waitime == 0)
{
- this.canCheckCode = false;
- Application.RunOnMainThread(() =>
+ HdlThreadLogic.Current.RunMain(() =>
{
if (btnNext != null)
{
@@ -171,16 +177,15 @@
});
break;
}
- Application.RunOnMainThread(() =>
+ HdlThreadLogic.Current.RunMain(() =>
{
if (btnNext != null)
{
btnNext.Text = waitime + "s" + repeat;
}
- });
+ }, ShowErrorMode.NO);
}
- })
- { IsBackground = true }.Start();
+ });
}
#endregion
@@ -191,27 +196,29 @@
/// 楠岃瘉楠岃瘉鐮�
/// </summary>
/// <returns></returns>
- private async void CheckVerificationCode(string code)
+ private bool CheckVerificationCode(string code)
{
if (this.canCheckCode == false)
{
//楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
this.btnErrorMsg.Visible = true;
- return;
+ return false;
}
var checkCodePra = new CheckCodePra();
checkCodePra.Code = code;
- bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
+ bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
if (flage == false)
{
//楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
this.btnErrorMsg.Visible = true;
- return;
+ return false;
}
var from = new CheckNewPhoneForm();
base.AddFromAndRemoveNowForm(from);
+
+ return true;
}
#endregion
--
Gitblit v1.8.0