From f759dc1e6f49c53733eafda82207c85af18f9931 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期四, 28 五月 2020 15:46:54 +0800
Subject: [PATCH] 2020-05-28-1

---
 ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs |   28 ++++++++++++++++++++--------
 1 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs b/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
index 79c3b95..ed03e42 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
@@ -60,8 +60,13 @@
             {
                 config = new Config { };
             }
-        }
-        
+            if (config.PasswordEncrypt != string.Empty)
+            {
+                //瑙e瘑
+                config.Password = Phone.UserCenter.UserCenterLogic.DecryptPassword("hD1(La3o", config.PasswordEncrypt);
+            }
+        }
+
         /// <summary>
         /// 褰撳墠鐧诲綍鐨勫笎鍙�
         /// </summary>
@@ -69,7 +74,12 @@
         /// <summary>
         /// 褰撳墠甯愬彿瀵嗙爜
         /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
         public string Password = string.Empty;
+        /// <summary>
+        /// 鍔犲瘑瀵嗙爜
+        /// </summary>
+        public string PasswordEncrypt = string.Empty;
         /// <summary>
         /// 鐭俊鐧诲綍杩斿洖鐨刴d5鍚庣殑瀵嗙爜
         /// </summary>
@@ -90,7 +100,12 @@
         /// 杩滅▼杩炴帴鐨凪qtt鐨勫鎴风ID
         /// </summary>
         [Newtonsoft.Json.JsonIgnore]
-        public string ConnEmqClientId = string.Empty;
+        public string ConnEmqClientId = string.Empty;
+        /// <summary>
+        /// 褰撳墠鐧诲綍鐨勮处鍙锋槸涓嶆槸涔嬪墠鐨勮处鍙�
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        public bool TheSameLoginAccount = false;
 
         [Newtonsoft.Json.JsonIgnore]
         /// <summary>
@@ -124,11 +139,6 @@
         /// 鐧诲綍鏃禩oken
         /// </summary>
         public string LoginToken = string.Empty;
-
-        /// <summary>
-        /// 鐧诲綍杩囩殑甯愬彿淇℃伅
-        /// </summary>
-        public List<string> AccountList = new List<string> { };
 
         public List<string> HomeFilePathList = new List<string> { };
 
@@ -181,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