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 | 98 ++++++++++--------------------------------------
1 files changed, 21 insertions(+), 77 deletions(-)
diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
index e526391..201b868 100644
--- a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
@@ -6,8 +6,6 @@
using Shared;
using HDL_ON.Entity;
using HDL_ON.DAL.Server;
-using System.Security.Cryptography;
-using System.Text;
namespace HDL_ON.UI.UI1Login
{
@@ -176,7 +174,7 @@
/// <param name="type">鏄惁閫夋嫨鎵嬫満鐧诲綍</param>
void LoginTypeChange(bool isPhone)
{
- if(isPhone)
+ if (isPhone)
{
if (loginType == 0)
return;
@@ -639,9 +637,12 @@
}
else
{
- BindingResidencePage page = new BindingResidencePage();
- MainPage.BaseView.AddChidren(page);
- page.LoadView();
+ //Application.RunOnMainThread(() =>
+ //{
+ // BindingResidencePage page = new BindingResidencePage();
+ // MainPage.BaseView.AddChidren(page);
+ // page.LoadView();
+ //});
@@ -650,7 +651,7 @@
UserInfo.Current.LastTime = DateTime.MinValue;
UserInfo.Current.SaveUserInfo();
//鐧诲綍澶辫触锛岃鍏堟坊鍔犱綇瀹咃紒
- Utlis.ShowAlertOnMainThread(Language.StringByID(StringId.FailedGetHomeList));
+ //Utlis.ShowAlertOnMainThread(Language.StringByID(StringId.FailedGetHomeList));
}
}
}
@@ -768,7 +769,7 @@
IMessageCommon.Current.ShowErrorInfoAlter(loginResult.Code);
});
-
+
}
return result;
}
@@ -794,7 +795,7 @@
var unlockDatetime = Utlis.UnixToDateTimeMS(revertData.unlockTime);
var unlockTimeInt = unlockDatetime.Minute - DateTime.Now.Minute;
- if(unlockTimeInt <= 0)
+ if (unlockTimeInt <= 0)
{
unlockTimeInt = 1;
}
@@ -813,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)
@@ -824,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;
}
@@ -841,12 +849,6 @@
{
//2020-12-22 澧炲姞鐐瑰嚮闅愯棌閿洏浜嬩欢
Application.HideSoftInput();
-
-
-#if DEBUG
- TestEZSDK();
- return;
-#endif
//鍒ゆ柇鏄惁鍚屾剰浜嗛殣绉佹斂绛�
if (CheckPrivacyPolicy() == false) return;
@@ -862,65 +864,12 @@
MainPage.Log($"login callBackAction : {ex.Message}");
}
};
-
+
var registerPage = new RegisterPage(autoLoginAction);
registerPage.Show();
registerPage.ShowDialog();
};
- }
-
-
- void TestESVideo()
- {
-
-#if __Android__
-#else
- //EZSDK.IOS.EZSDK.Go2EZvizMonitor();
- Shared.ESVideoInfo eSVideoInfo = new Shared.ESVideoInfo();
- eSVideoInfo.DeviceName = "瀹ゅ鏈�88";
- eSVideoInfo.ESVideoUUID = "JJY000019VPLLF";
- eSVideoInfo.ESRoomID = 801;
- eSVideoInfo.RoomName = "0801";
- Shared.ESVideo.ShowESVideoMonitor(eSVideoInfo);
- return;
-#endif
-
- }
-
- /// <summary>
- ///
- /// </summary>
- /// <param name="signstr"></param>
- /// <returns></returns>
- static string SignMD5Encrypt(string s)
- {
- byte[] sign = MD5.Create().ComputeHash(UTF8Encoding.UTF8.GetBytes(s));
- string signstr = string.Empty;
- foreach (byte item in sign)
- {
- signstr += item.ToString("X2");
- }
- return signstr.ToLower();
- }
-
- void TestEZSDK()
- {
-
-#if __Android__
-#else
- //璁剧疆瀛愯处鍙稟ccessToken鏂规
- EZSDK.IOS.EZSDK.SetEZAccessToken("ra.cekz6j9y1zg7mqgj3rmb099p49fuf6w3-9keosamseq-00wktld-brmhuciz1");
-
- EZSDK.IOS.EZSDK.Go2EZvizMonitor();
-
-
- //var psw = SignMD5Encrypt("1aa98a90489b4838b966b57018b4b04b#123456");
-
- //Utlis.WriteLine("MD5 psw: " + psw);
- return;
-#endif
-
}
/// <summary>
@@ -932,11 +881,6 @@
{
//2020-12-22 澧炲姞鐐瑰嚮闅愯棌閿洏浜嬩欢
Application.HideSoftInput();
-
-#if DEBUG
- TestESVideo();
- return;
-#endif
//鍒ゆ柇鏄惁鍚屾剰浜嗛殣绉佹斂绛�
if (CheckPrivacyPolicy() == false) return;
--
Gitblit v1.8.0