From f982455916297ab07379d902a7f15b7a7a867c94 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 20 十月 2021 09:19:20 +0800
Subject: [PATCH] 1
---
HDL_ON/UI/UI1-Login/LoginPageBLL.cs | 87 +++++++++++++++++++++++++++++++++++++------
1 files changed, 75 insertions(+), 12 deletions(-)
diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
index a2d2bb8..201b868 100644
--- a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
@@ -174,7 +174,7 @@
/// <param name="type">鏄惁閫夋嫨鎵嬫満鐧诲綍</param>
void LoginTypeChange(bool isPhone)
{
- if(isPhone)
+ if (isPhone)
{
if (loginType == 0)
return;
@@ -598,7 +598,7 @@
if (verAccount == etPassword.Text.Trim())
{
//璺宠浆椤甸潰----
- MainPage.GoUserPage();
+ MainPage.GoUserPage(true);
return;
}
});
@@ -629,15 +629,20 @@
//}
Application.RunOnMainThread(() =>
{
+ //20201223-鐧诲綍鎴愬姛涔嬪悗锛屽皢涓嬭浇鏁版嵁瀹屾垚鏍囪鏍囪涓篺alse锛岄槻姝富椤垫彁鍓嶅姞杞�
+ Common.ApiUtlis.Ins.DownloadDataComplete = false;
//璺宠浆椤甸潰----
- MainPage.GoUserPage();
+ MainPage.GoUserPage(true);
});
}
else
{
- BindingResidencePage page = new BindingResidencePage();
- MainPage.BaseView.AddChidren(page);
- page.LoadView();
+ //Application.RunOnMainThread(() =>
+ //{
+ // BindingResidencePage page = new BindingResidencePage();
+ // MainPage.BaseView.AddChidren(page);
+ // page.LoadView();
+ //});
@@ -646,7 +651,7 @@
UserInfo.Current.LastTime = DateTime.MinValue;
UserInfo.Current.SaveUserInfo();
//鐧诲綍澶辫触锛岃鍏堟坊鍔犱綇瀹咃紒
- Utlis.ShowAlertOnMainThread(Language.StringByID(StringId.FailedGetHomeList));
+ //Utlis.ShowAlertOnMainThread(Language.StringByID(StringId.FailedGetHomeList));
}
}
}
@@ -735,6 +740,8 @@
//璐﹀彿鎴栬�呭瘑鐮侀敊璇�
Application.RunOnMainThread(() =>
{
+ waitPage.Hide();
+
if (loginResult.Code == "10008")
{
//鐢ㄦ埛鍚嶆垨瀵嗙爜閿欒
@@ -752,12 +759,53 @@
btnPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
btnPasswordViewBottomLine.Height = Application.GetRealHeight(2);
}
- waitPage.Hide();
+ else if (loginResult.Code == StateCode.AccountLoginLock)
+ {
+ ShowAccountLoginLockTip(loginResult);
+ //var tipStr = Language.StringByID(StringId.AccountLoginLock) + "\r\n" + Language.StringByID(StringId.PleaseTryToForgetPassword);
+ //Utlis.ShowTip(tipStr);
+ return;
+ }
+ IMessageCommon.Current.ShowErrorInfoAlter(loginResult.Code);
});
- IMessageCommon.Current.ShowErrorInfoAlter(loginResult.Code);
+
}
return result;
+ }
+
+ /// <summary>
+ /// 瑙f瀽鎻愮ず鐢ㄦ埛瑙i攣鏃堕棿
+ /// 瀵嗙爜閿欒娆℃暟杩囧锛岃处鍙疯閿佸畾锛佽閫氳繃蹇樿瀵嗙爜鎵惧洖瀵嗙爜鎴杮0}鍒嗛挓鍚庨噸璇�.
+ /// </summary>
+ /// <param name="loginResult"></param>
+ void ShowAccountLoginLockTip(ResponsePackNew loginResult)
+ {
+ //瀵嗙爜閿欒娆℃暟杩囧锛岃处鍙疯閿佸畾锛�
+ var tipStr = Language.StringByID(StringId.AccountLoginLock);
+ try
+ {
+ if (loginResult.extra != null)
+ {
+ //璇烽�氳繃蹇樿瀵嗙爜鎵惧洖瀵嗙爜鎴杮0}鍒嗛挓鍚庨噸璇�.
+ var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountLoginLockExtraRes>(loginResult.extra.ToString());
+ string msg = Language.StringByID(StringId.PleaseTryToForgetPassword);
+ //var unlockTime = Utlis.UnixToDateTimeWithFormatMS(revertData.unlockTime, "HH:mm");
+ //msg = msg.Replace("{0}", unlockTime);
+
+ var unlockDatetime = Utlis.UnixToDateTimeMS(revertData.unlockTime);
+ var unlockTimeInt = unlockDatetime.Minute - DateTime.Now.Minute;
+ if (unlockTimeInt <= 0)
+ {
+ unlockTimeInt = 1;
+ }
+ msg = msg.Replace("{0}", unlockTimeInt.ToString());
+ tipStr = tipStr + "\r\n" + msg;
+ }
+ }
+ catch { }
+
+ Utlis.ShowTip(tipStr);
}
/// <summary>
@@ -766,8 +814,8 @@
bool LoadMethod_GetResidences()
{
var result = false;
- var responsePack = pm.GetHomePager();
- if (responsePack == StateCode.SUCCESS)
+ var code = pm.GetHomePager();
+ if (code == StateCode.SUCCESS)
{
////2020-11-13 寰呯‘璁わ紝娌℃湁浣忓畢锛屼笉绠楃櫥褰曟垚鍔�
//if (UserInfo.Current.regionList != null && UserInfo.Current.regionList.Count > 0)
@@ -777,10 +825,17 @@
//2020-12-10 娌℃湁浣忓畢鐧诲綍鎴愬姛锛屼絾鏄笉鑳借繘鍏ヤ富鐣岄潰
result = true;
}
+ else if( code == "null")
+ {
+ Application.RunOnMainThread(() =>
+ {
+ MainPage.GoUserPage(false);
+ });
+ }
else
{
// 鎻愮ず閿欒
- IMessageCommon.Current.ShowErrorInfoAlter(responsePack);
+ IMessageCommon.Current.ShowErrorInfoAlter(code);
}
return result;
}
@@ -792,6 +847,9 @@
{
btnRegister.MouseUpEventHandler += (sender, e) =>
{
+ //2020-12-22 澧炲姞鐐瑰嚮闅愯棌閿洏浜嬩欢
+ Application.HideSoftInput();
+
//鍒ゆ柇鏄惁鍚屾剰浜嗛殣绉佹斂绛�
if (CheckPrivacyPolicy() == false) return;
@@ -806,6 +864,7 @@
MainPage.Log($"login callBackAction : {ex.Message}");
}
};
+
var registerPage = new RegisterPage(autoLoginAction);
registerPage.Show();
@@ -820,6 +879,9 @@
{
btnForgetPassword.MouseUpEventHandler += (sender, e) =>
{
+ //2020-12-22 澧炲姞鐐瑰嚮闅愯棌閿洏浜嬩欢
+ Application.HideSoftInput();
+
//鍒ゆ柇鏄惁鍚屾剰浜嗛殣绉佹斂绛�
if (CheckPrivacyPolicy() == false) return;
@@ -835,6 +897,7 @@
MainPage.Log($"login callBackAction : {ex.Message}");
}
};
+
var forgetPasswordDialog = new ForgetPasswordPage(autoLoginAction);
forgetPasswordDialog.Show();
forgetPasswordDialog.ShowDialog();
--
Gitblit v1.8.0