| | |
| | | #endregion |
| | | |
| | | #region ----获取门锁 |
| | | |
| | |
|
| | | /// <summary> |
| | | /// 获取自己+其他成员信息 |
| | | /// </summary> |
| | |
| | | var AllUserIfon = await ReadUserListIfon(doorlockMac); |
| | | var currUserIfon = new MembershipIfon(); |
| | | currUserIfon.CloudAccountId = Config.Instance.Guid; |
| | | if (string.IsNullOrEmpty(Config.Instance.UserName)) |
| | | if (string.IsNullOrEmpty(UserCenter.UserCenterResourse.UserInfo.UserName)) |
| | | { |
| | | currUserIfon.UserName = Config.Instance.Account; |
| | | currUserIfon.UserName = UserCenter.UserCenterResourse.UserInfo.Account; |
| | | } |
| | | else |
| | | { |
| | | currUserIfon.UserName = Config.Instance.UserName; |
| | | currUserIfon.UserName = UserCenter.UserCenterResourse.UserInfo.UserName; |
| | | } |
| | | foreach (var o in AllUserIfon) |
| | | { |
| | |
| | | |
| | | public static async System.Threading.Tasks.Task<string> ReadUserList(string doorlockMac) |
| | | { |
| | | string s = null; |
| | | string s = null; |
| | | var str = await WebClientAsync(0, CommonPage.RequestHttpsHost+"/App/GetHomePager");//不同区域域名前缀不一样 |
| | | // var str = await WebClientAsync(0, "https://global.hdlcontrol.com/HangZhouHdlCloudApi/App/GetHomePager"); |
| | | var jObject = JObject.Parse(str); |
| | |
| | | } |
| | | return s; |
| | | } |
| | | |
| | | |
| | | public static async System.Threading.Tasks.Task<string> ReadUserDoorLock(Residential residential) |
| | | { |
| | | |
| | |
| | | postValues.Add("RequestVersion", CommonPage.RequestVersion); |
| | | postValues.Add("LoginAccessToken", Config.Instance.Token); |
| | | postValues.Add("MainAccountId", residential.MainUserDistributedMark); |
| | | postValues.Add("SharedHid", residential.Id); |
| | | postValues.Add("SharedHid", residential.Id);
|
| | | } |
| | | else if (value == 2) |
| | | { |
| | |
| | | public string doorlockmac; |
| | | } |
| | | |
| | | public class MembershipIfon |
| | | public class MembershipIfon |
| | | { |
| | | /// <summary> |
| | | /// 识别用户身份 |