From 627093aca723d4bfb971b97c828e8b3a22dbda78 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 17 七月 2020 17:26:19 +0800
Subject: [PATCH] 2020-07-17-1
---
ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs | 45 ++++++++++++++++++++++++++++++---------------
1 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs b/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
old mode 100644
new mode 100755
index df0aa24..0e9c605
--- a/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
@@ -40,10 +40,7 @@
return (DateTime.Now - LoginDateTime).Days < 7;
}
}
- /// <summary>
- ///鏆傛椂榛樿
- /// </summary>
- public string UserName = string.Empty;
+
/// <summary>
/// 璐︽埛鐧诲綍鎴愬姛鐨勮处鎴风被鍨�
/// </summary>
@@ -63,8 +60,13 @@
{
config = new Config { };
}
- }
-
+ if (config.PasswordEncrypt != string.Empty)
+ {
+ //瑙e瘑
+ config.Password = Phone.UserCenter.UserCenterLogic.DecryptPassword("hD1(La3o", config.PasswordEncrypt);
+ }
+ }
+
/// <summary>
/// 褰撳墠鐧诲綍鐨勫笎鍙�
/// </summary>
@@ -72,7 +74,12 @@
/// <summary>
/// 褰撳墠甯愬彿瀵嗙爜
/// </summary>
+ [Newtonsoft.Json.JsonIgnore]
public string Password = string.Empty;
+ /// <summary>
+ /// 鍔犲瘑瀵嗙爜
+ /// </summary>
+ public string PasswordEncrypt = string.Empty;
/// <summary>
/// 鐭俊鐧诲綍杩斿洖鐨刴d5鍚庣殑瀵嗙爜
/// </summary>
@@ -80,11 +87,7 @@
/// <summary>
/// 鐧婚檰璐﹀彿鐨凣uid
/// </summary>
- public string Guid = string.Empty;
- /// <summary>
- /// 鏄惁鏄鐞嗗憳鏉冮檺(鍙樻洿浜�,鎴愬憳鐨勬椂鍊�,杩欎釜涔熶负ture銆備负浠�涔堜細澹版槑杩欐牱鍙橀噺,鍥犱负鏈変簺鎺ュ彛蹇呴』浣跨敤鍘熸潵鐨凾oken)
- /// </summary>
- public bool isAdministrator = false;
+ public string Guid = string.Empty;
/// <summary>
/// 鎴愬憳璇锋眰鎺у埗涓诲笎鍙锋浣忓畢鏃惰姹傚熀鍦板潃
/// </summary>
@@ -93,6 +96,16 @@
/// 鎴愬憳璇锋眰鎺у埗涓诲笎鍙锋浣忓畢鏃惰姹傚熀鍦板潃鐨凩oginAccessToken鐨勫��
/// </summary>
public string AdminRequestToken = string.Empty;
+ /// <summary>
+ /// 杩滅▼杩炴帴鐨凪qtt鐨勫鎴风ID
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public string ConnEmqClientId = string.Empty;
+ /// <summary>
+ /// 褰撳墠鐧诲綍鐨勮处鍙锋槸涓嶆槸涔嬪墠鐨勮处鍙�
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public bool TheSameLoginAccount = false;
[Newtonsoft.Json.JsonIgnore]
/// <summary>
@@ -123,14 +136,14 @@
}
/// <summary>
- /// 鐧诲綍杩囩殑甯愬彿淇℃伅
+ /// 鐧诲綍鏃禩oken
/// </summary>
- public List<string> AccountList = new List<string> { };
+ public string LoginToken = string.Empty;
public List<string> HomeFilePathList = new List<string> { };
public string HomeId = string.Empty;
-
+
[Newtonsoft.Json.JsonIgnore]
private House m_Home = null;
/// <summary>
@@ -146,7 +159,7 @@
{
return m_Home;
}
- m_Home = House.GetHouseByHouseId(HomeId);
+ m_Home = Phone.UserCenter.HdlResidenceLogic.Current.GetHouseByHouseId(HomeId);
if (m_Home == null)
{
m_Home = new House();
@@ -178,6 +191,8 @@
/// </summary>
public void Save()
{
+ //鍔犲瘑,涓嶈兘淇濆瓨鏄庣爜
+ this.PasswordEncrypt = Phone.UserCenter.UserCenterLogic.EncryptPassword("hD1(La3o", this.Password);
var bytes = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this));
Shared.IO.FileUtils.WriteFileByBytes(fileName, bytes);
ReFresh();
--
Gitblit v1.8.0