黄学彪
2020-04-02 9904031f5291daaf56985146bb671f25e18ebbdf
ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
@@ -60,8 +60,13 @@
            {
                config = new Config { };
            }
        }
            if (config.PasswordEncrypt != string.Empty)
            {
                //解密
                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>
        /// 短信登录返回的md5后的密码
        /// </summary>
@@ -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();