From 587c36e27131f2d028fcabc13b296a8de7470034 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期三, 08 一月 2020 08:59:19 +0800
Subject: [PATCH] 2019.1.8
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs | 286 +++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 227 insertions(+), 59 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
index 24756d1..3c21f62 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
@@ -1,4 +1,5 @@
-锘縰sing System;
+锘縰sing Shared.Common;
+using System;
using System.Collections.Generic;
namespace Shared.Phone.UserCenter
@@ -59,7 +60,25 @@
/// <summary>
/// 鐢ㄦ埛鍥炬爣鏂囦欢
/// </summary>
+ [Newtonsoft.Json.JsonIgnore]
public string UserIconFile = string.Empty;
+ /// <summary>
+ /// 鐢ㄦ埛鍥炬爣鏂囦欢鏄惁鏀瑰彉
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public bool UserIconFileChanged = false;
+ /// <summary>
+ /// 鐢ㄦ埛澶村儚鏁版嵁(涓存椂鐢�,浼氱疆绌�)
+ /// </summary>
+ public byte[] HeadImage = null;
+ /// <summary>
+ /// 鎵嬪娍瀵嗙爜(涓存椂鐢�,浼氱疆绌�)
+ /// </summary>
+ public string GesturePwd = string.Empty;
+ /// <summary>
+ /// 瀵嗙爜楠岃瘉(涓存椂鐢�,浼氱疆绌�)
+ /// </summary>
+ public string StringPwd = string.Empty;
}
/// <summary>
@@ -82,6 +101,17 @@
/// 鐢ㄦ埛鍚�
/// </summary>
public string UserName = string.Empty;
+ }
+
+ /// <summary>
+ /// 鏄电О淇℃伅
+ /// </summary>
+ public class NicknameInfo
+ {
+ /// <summary>
+ /// 鏄电О
+ /// </summary>
+ public string nickname = string.Empty;
}
#endregion
@@ -124,6 +154,10 @@
/// AccountType
/// </summary>
public int AccountType = 0;
+ /// <summary>
+ /// 鏄惁鎷ユ湁杩滅▼鎺у埗鏉冮檺
+ /// </summary>
+ public bool IsAllowRemoteCtrl = false;
}
/// <summary>
@@ -151,6 +185,10 @@
/// 鎵嬫満鍙�
/// </summary>
public string Phone = string.Empty;
+ /// <summary>
+ /// 澶村儚鏁版嵁
+ /// </summary>
+ public byte[] HeadImage = null;
}
#endregion
@@ -761,7 +799,7 @@
/// <summary>
/// Page
/// </summary>
- public int Page = 0;
+ public int Page = 1;
/// <summary>
/// PageSize
/// </summary>
@@ -890,17 +928,21 @@
public class MemberShardInfoData
{
/// <summary>
- /// 鎴愬憳鐨勫叏閮ㄥ垎浜暟鎹�,閲岄潰鍖呭惈鎵�鏈夌殑鏂囦欢(keys:鎴块棿鏂囦欢鍚� value:鏂囦欢鍚�)
- /// </summary>
- public Dictionary<string, HashSet<string>> dicAllMemberShard = new Dictionary<string, HashSet<string>>();
- /// <summary>
/// 鍏ㄩ儴鐨勫垎浜枃浠剁殑涓婚敭(keys:鏂囦欢鍚� value:涓婚敭)
/// </summary>
public Dictionary<string, string> dicAllShardKeys = new Dictionary<string, string>();
/// <summary>
- /// 鍒嗕韩鎴块棿鐨勫璞�(瀹冩槸浠庝簯绔潵鐨�)
+ /// 鍒嗕韩鎴块棿鐨勫璞�(瀹冩槸浠庝簯绔潵鐨�,keys:鏂囦欢鍚�)
/// </summary>
- public Dictionary<string, Common.Room> dicShardRoom = new Dictionary<string, Common.Room>();
+ public Dictionary<string, Room> dicShardRoom = new Dictionary<string, Common.Room>();
+ /// <summary>
+ /// 鍒嗕韩鐨勬ゼ灞�
+ /// </summary>
+ public Dictionary<string, string> dicShardFloor = new Dictionary<string, string>();
+ /// <summary>
+ /// 涓存椂鍙橀噺(杩欎釜涓滆タ涓簄ull,鍗充笉鏄柊鍒嗕韩鐨勬埧闂�,鍚﹀垯鏄柊鍒嗕韩鐨勬埧闂淬�傜敤瀹岃寰楃疆绌�)
+ /// </summary>
+ public Room TempRoom = null;
/// <summary>
/// 鏄惁闇�瑕佸埛鏂�
/// </summary>
@@ -986,74 +1028,200 @@
#endregion
- #region 鈻� 璐﹀彿璁剧疆绫籣_________________________
+ #region 鈻� 浣忓畢淇℃伅绫籣_________________________
/// <summary>
- /// 璐﹀彿璁剧疆淇℃伅
+ /// 缂栬緫浣忓畢鐨勫惎鍔ㄥ弬鏁�
/// </summary>
- public class AccountOption
+ public class EditorResidencePra : IfacePraCommon
{
/// <summary>
- /// 鏄惁浣跨敤鎸囩汗楠岃瘉
+ /// RequestVersion
/// </summary>
- public bool FingerprintAuthentication = false;
+ public string RequestVersion = Common.CommonPage.RequestVersion;
/// <summary>
- /// 瀵嗙爜楠岃瘉
+ /// LoginAccessToken
/// </summary>
- public string PswAuthentication = string.Empty;
+ public string LoginAccessToken = Common.Config.Instance.Token;
/// <summary>
- /// 鎵嬪娍楠岃瘉
+ /// ZigbeeHomeId
/// </summary>
- public string GestureAuthentication = string.Empty;
+ public string HomeId = "";
/// <summary>
- /// 鏄惁浣跨敤杩滅▼寮�閿�
+ /// Name
/// </summary>
- public bool DoorUnLockByRemote = false;
+ public string Name = string.Empty;
/// <summary>
- /// 淇濆瓨
+ /// 缁忓害
/// </summary>
- public void Save()
+ public double Longitude = 0;
+ /// <summary>
+ /// 绾害
+ /// </summary>
+ public double Latitude = 0;
+ }
+ #endregion
+
+ #region 鈻� 娑堟伅绠$悊绫籣_________________________
+
+ /// <summary>
+ /// 鑾峰彇娑堟伅璁板綍鐨勮姹傚弬鏁�
+ /// </summary>
+ public class MessageInfoPra : IfacePraCommon
+ {
+ /// <summary>
+ /// RequestVersion
+ /// </summary>
+ public string RequestVersion = Common.CommonPage.RequestVersion;
+ /// <summary>
+ /// LoginAccessToken
+ /// </summary>
+ public string LoginAccessToken = Common.Config.Instance.Token;
+ /// <summary>
+ /// ZigbeeHomeId
+ /// </summary>
+ public string HomeId = Common.Config.Instance.Home.Id;
+ /// <summary>
+ /// 涓婚
+ /// </summary>
+ public string Topic = null;
+ /// <summary>
+ /// 寮�濮嬫椂闂�
+ /// </summary>
+ public string BeginTime = null;
+ /// <summary>
+ /// 缁撴潫鏃堕棿
+ /// </summary>
+ public string EndTime = null;
+ /// <summary>
+ /// 椤垫暟
+ /// </summary>
+ public PageSettingInfo PageSetting = new PageSettingInfo();
+
+ public MessageInfoPra()
{
- //鍔犲瘑瀵嗙爜
- string hdlKey = "hD1(La3o";
- string oldPswAuthentication = PswAuthentication;
- PswAuthentication = UserCenterLogic.EncryptPassword(hdlKey, oldPswAuthentication);
-
- string oldGestureAuthentication = GestureAuthentication;
- GestureAuthentication = UserCenterLogic.EncryptPassword(hdlKey, oldGestureAuthentication);
-
- var data = Newtonsoft.Json.JsonConvert.SerializeObject(this);
- var byteData = System.Text.Encoding.UTF8.GetBytes(data);
- string fullName = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid, DirNameResourse.AccountOptionFile);
- //鍐欏叆鍐呭
- Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData);
- //杩樺師鏄庣爜
- PswAuthentication = oldPswAuthentication;
- GestureAuthentication = oldGestureAuthentication;
- }
-
- /// <summary>
- /// 鍔犺浇鏁版嵁
- /// </summary>
- /// <returns></returns>
- public AccountOption Load()
- {
- string fileName = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid, DirNameResourse.AccountOptionFile);
- if (System.IO.File.Exists(fileName) == false)
- {
- return new AccountOption();
- }
- var varByte = Shared.IO.FileUtils.ReadFile(fileName);
- string strValue = System.Text.Encoding.UTF8.GetString(varByte);
- var info = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountOption>(strValue);
- //瑙e瘑瀵嗙爜
- string hdlKey = "hD1(La3o";
- info.PswAuthentication = UserCenterLogic.DecryptPassword(hdlKey, info.PswAuthentication);
- info.GestureAuthentication = UserCenterLogic.DecryptPassword(hdlKey, info.GestureAuthentication);
-
- return info;
+ PageSetting.PageSize = 10;
}
}
+ /// <summary>
+ /// 娑堟伅涓績鐨勭粨鏋滆繑鍥炲��
+ /// </summary>
+ public class MessageCentetInfo
+ {
+ /// <summary>
+ /// 鍒楄〃鏁版嵁
+ /// </summary>
+ public List<MessageRecordInfo> PageData = null;
+ /// <summary>
+ /// PageIndex
+ /// </summary>
+ public int PageIndex = 0;
+ /// <summary>
+ /// PageSize
+ /// </summary>
+ public int PageSize = 0;
+ /// <summary>
+ /// TotalCount
+ /// </summary>
+ public int TotalCount = 0;
+ /// <summary>
+ /// TotalPages
+ /// </summary>
+ public int TotalPages = 0;
+ /// <summary>
+ /// HasPreviousPage
+ /// </summary>
+ public bool HasPreviousPage = false;
+ /// <summary>
+ /// HasNextPage
+ /// </summary>
+ public bool HasNextPage = false;
+ }
+
+ /// <summary>
+ /// 淇℃伅缁撴灉
+ /// </summary>
+ public class MessageRecordInfo
+ {
+ /// <summary>
+ /// 涓婚敭
+ /// </summary>
+ public string Id = string.Empty;
+ /// <summary>
+ /// 涓婚
+ /// </summary>
+ public string Topic = string.Empty;
+ /// <summary>
+ /// 缃戝叧涓婃姤鐨刯son
+ /// </summary>
+ public string PayloadJson = string.Empty;
+ /// <summary>
+ /// 鏄惁宸茶
+ /// </summary>
+ public bool IsReading = false;
+ /// <summary>
+ /// 鏃堕棿 2019-09-10T13:11:55
+ /// </summary>
+ public string CreatedOnUtc = string.Empty;
+ /// <summary>
+ /// 鍥剧墖鍦板潃
+ /// </summary>
+ public string IconPath = string.Empty;
+ /// <summary>
+ /// 娑堟伅绫诲瀷
+ /// </summary>
+ public string MsgObjectText = string.Empty;
+ /// <summary>
+ /// 娑堟伅鏂囨湰
+ /// </summary>
+ public string MsgText = string.Empty;
+ }
+
+ /// <summary>
+ /// 璁剧疆娑堟伅宸茶鐘舵�佺殑鍚姩鍙傛暟
+ /// </summary>
+ public class MessageReadStatuPra : IfacePraCommon
+ {
+ /// <summary>
+ /// RequestVersion
+ /// </summary>
+ public string RequestVersion = Common.CommonPage.RequestVersion;
+ /// <summary>
+ /// LoginAccessToken
+ /// </summary>
+ public string LoginAccessToken = Common.Config.Instance.Token;
+ /// <summary>
+ /// ZigbeeHomeId
+ /// </summary>
+ public string HomeId = Common.Config.Instance.Home.Id;
+ /// <summary>
+ /// ID
+ /// </summary>
+ public string Id = string.Empty;
+ /// <summary>
+ /// 宸茶鐘舵��
+ /// </summary>
+ public bool IsReading = true;
+ }
+
+ #endregion
+
+ #region 鈻� 闅愬尶鍔熻兘绫籣_________________________
+
+ /// <summary>
+ /// 闅愬尶鍔熻兘
+ /// </summary>
+ public class HideOptionInfo
+ {
+ /// <summary>
+ /// 鏄惁鏄剧ず涓婚〉闅愯棌鑿滃崟(Debug鐢�): 1 -> 鏄剧ず
+ /// </summary>
+ public int CenterHideMenu = 0;
+ /// <summary>
+ /// 鏄惁鍑哄姏璇︾粏Log 1 -> 鍑哄姏
+ /// </summary>
+ public int DetailedLog = 0;
+ }
#endregion
}
--
Gitblit v1.8.0