| | |
| | | /// 用户 |
| | | /// </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> |
| | |
| | | /// <summary> |
| | | /// 用户ID |
| | | /// </summary> |
| | | public int ID; |
| | | public string ID; |
| | | /// <summary> |
| | | /// 用户选择显示的语言 |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// 用户区域 |
| | | /// </summary> |
| | | public string areaCode = "86"; |
| | | |
| | | public int areaCode = 86; |
| | | /// <summary> |
| | | /// 用户头像图片 |
| | | /// </summary> |
| | |
| | | /// 用户头像byte数据 |
| | | /// </summary> |
| | | public byte[] headImagePageBytes = null; |
| | | |
| | | /// <summary> |
| | | /// 上一次登录时间 |
| | | /// </summary> |
| | | public DateTime lastTime = DateTime.MinValue; |
| | | |
| | | /// <summary> |
| | | /// 是否是登录状态 |
| | | /// </summary> |
| | |
| | | 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> |
| | | /// 软件解锁界面 |
| | | /// 1:启动时 |
| | | /// 2:布防撤防时 |
| | | /// 3:远程开锁时 |
| | | /// </summary> |
| | | //[Newtonsoft.Json.JsonIgnore] |
| | | public List<string> appUnlockPage = new List<string>(); |
| | | /// <summary> |
| | | /// 软件解锁方式 |
| | | /// 1:数字密码 |
| | | /// 2:手势密码 |
| | | /// 3:指纹密码 |
| | | /// 4:面容ID |
| | | /// </summary> |
| | | public List<string> appUnlockType = new List<string>(); |
| | | /// <summary> |
| | | /// 软件解锁密码 |
| | | /// </summary> |
| | | //[Newtonsoft.Json.JsonIgnore] |
| | | public string appUnlockPasswrod = ""; |
| | | |
| | | |
| | | private byte[] convertByte(Image img) |