From f788a1e320b8505435ed66e2456ddb2d0a838f76 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 19 十一月 2020 19:58:14 +0800
Subject: [PATCH] 2020-11-19 1.优化绑定和解绑页面。2.修改密码功能实现,UI界面实现,接口实现。

---
 HDL_ON/Entity/UserInfo.cs |   71 +++++++++++++++--------------------
 1 files changed, 31 insertions(+), 40 deletions(-)

diff --git a/HDL_ON/Entity/UserInfo.cs b/HDL_ON/Entity/UserInfo.cs
index 5f88b0f..c8e300f 100644
--- a/HDL_ON/Entity/UserInfo.cs
+++ b/HDL_ON/Entity/UserInfo.cs
@@ -17,10 +17,25 @@
         /// 鐢ㄦ埛
         /// </summary>
         public string accountString = "";
+        ///// <summary>
+        ///// 鐢ㄦ埛瀵嗙爜
+        ///// </summary>
+        //public string Password = "";
+        string aesPassword = "";
         /// <summary>
-        /// 鐢ㄦ埛瀵嗙爜
+        ///  鐢ㄦ埛瀵嗙爜
         /// </summary>
-        public string password = "";
+        public string password
+        {
+            get
+            {
+                return Shared.Securitys.EncryptionService.AesDecryptTopic(aesPassword, "85521566HDLONPRO");
+            }
+            set
+            {
+                aesPassword = Shared.Securitys.EncryptionService.AesEncryptTopic(value, "85521566HDLONPRO");
+            }
+        }
         /// <summary>
         /// 鐢ㄦ埛鎵嬫満鍙风爜
         /// </summary>
@@ -32,7 +47,7 @@
         /// <summary>
         /// 鐢ㄦ埛ID
         /// </summary>
-        public int ID;
+        public string ID;
         /// <summary>
         /// 鐢ㄦ埛閫夋嫨鏄剧ず鐨勮瑷�
         /// </summary>
@@ -41,7 +56,6 @@
         /// 鐢ㄦ埛鍖哄煙
         /// </summary>
         public string areaCode = "86";
-
         /// <summary>
         /// 鐢ㄦ埛澶村儚鍥剧墖
         /// </summary>
@@ -50,12 +64,10 @@
         /// 鐢ㄦ埛澶村儚byte鏁版嵁
         /// </summary>
         public byte[] headImagePageBytes = null;
-
         /// <summary>
         /// 涓婁竴娆$櫥褰曟椂闂�
         /// </summary>
         public DateTime lastTime = DateTime.MinValue;
-
         /// <summary>
         /// 鏄惁鏄櫥褰曠姸鎬�
         /// </summary>
@@ -66,50 +78,29 @@
                 return (DateTime.Now - lastTime).TotalDays < 7;
             }
         }
+        /// <summary>
+        /// 
+        /// </summary>
+        public string loginTokenString;
+        /// <summary>
+        /// 
+        /// </summary>
+        public string refreshToken;
+        /// <summary>
+        /// UserType B绔处鍙� C绔处鍙� 
+        /// </summary>
+        public string userType = "C";
 
-        public int accountType = 0;
 
-        public int masterID = 0;
-
-        public string loginTokenString
-        {
-            get
-            {
-                var result = Encoding.UTF8.GetBytes(password);
-                var md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
-                var output = md5.ComputeHash(result);
-                var md5Password = BitConverter.ToString(output).Replace("-", "");
-                var account_md5Pssword = accountString + ":" + md5Password;
-                var tokenBytes = Encoding.UTF8.GetBytes(account_md5Pssword);
-                return Convert.ToBase64String(tokenBytes).Replace("=", "%3D");
-            }
-        }
         /// <summary>
         /// 鐢ㄦ埛浣忓畢鍒楄〃
         /// </summary>
         public List<RegionInfoRes> regionList = new List<RegionInfoRes>();
 
-        /// <summary>
-        ///  <!--SIP 甯愬彿-->
-        ///  鍙瀵硅浣跨敤鐨勭櫥褰曡处鍙�
-        /// </summary>
-        public string SIP_Account;
-
         public void SaveUserInfo()
         {
-            FileUtils.WriteFileByBytes("Register_File", Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)));
+            FileUtils.WriteFileByBytes("UserInfo_File", Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)));
         }
-
-        /// <summary>
-        /// 杞欢瑙i攣璁剧疆
-        /// </summary>
-        [Newtonsoft.Json.JsonIgnore]
-        public List<string> appUnlock = new List<string>();
-        /// <summary>
-        /// 杞欢瑙i攣瀵嗙爜
-        /// </summary>
-        [Newtonsoft.Json.JsonIgnore]
-        public string appUnlockPasswrod = "";
 
 
         private byte[] convertByte(Image img)

--
Gitblit v1.8.0