From 23532fa8ad34c89b6d24b01eaef6475fd0aad898 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 15 四月 2020 18:08:24 +0800
Subject: [PATCH] ???????

---
 ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs |   27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs b/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
index a0ea1e3..7c83759 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>
@@ -77,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>
@@ -128,11 +134,6 @@
         /// 鐧诲綍鏃禩oken
         /// </summary>
         public string LoginToken = string.Empty;
-
-        /// <summary>
-        /// 鐧诲綍杩囩殑甯愬彿淇℃伅
-        /// </summary>
-        public List<string> AccountList = new List<string> { };
 
         public List<string> HomeFilePathList = new List<string> { };
 
@@ -185,6 +186,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