| | |
| | | code = Ins.HttpRequest.RefreshToken(); |
| | | if (code != StateCode.SUCCESS) |
| | | { |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | MainPage.Log($"刷新token失败"); |
| | | return; |
| | | } |
| | |
| | | code = Ins.HttpRequest.GetHomePager(); |
| | | if (code != StateCode.SUCCESS) |
| | | { |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | MainPage.Log($"刷新住宅信息失败"); |
| | | return; |
| | | } |
| | |
| | | code = Ins.HttpRequest.GetUserInfo(); |
| | | if (code != StateCode.SUCCESS) |
| | | { |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | MainPage.Log($"刷新个人信息失败"); |
| | | return; |
| | | } |
| | |
| | | FunctionList.List.ClearDatas(); |
| | | //MainPage.Log($"============设备============开始" + FunctionList.List.Functions.Count); |
| | | //MainPage.Log($"读取设备信息成功"); |
| | | //MainPage.Log($"sid列表获取====" + deviceResult.Data.ToString()); |
| | | MainPage.Log($"sid列表获取====" + deviceResult.Data.ToString()); |
| | | var deviceList = JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString()); |
| | | if (deviceList == null) |
| | | { |
| | |
| | | string videoList = videoInfo.Data.ToString(); |
| | | FunctionList.List.videoIntercom = JsonConvert.DeserializeObject<List<UI.UI2.FuntionControlView.Video.Video>>(videoList); |
| | | |
| | | foreach (var video in FunctionList.List.videoIntercom) |
| | | for(int i =0;i< FunctionList.List.videoIntercom.Count;i++) |
| | | { |
| | | var video = FunctionList.List.videoIntercom[i]; |
| | | |
| | | if (video.interphoneType == InterphoneType.IMOUVISIAL.ToString()) |
| | | { |
| | | UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken = video.subAccountToken; |
| | |
| | | } |
| | | else if (video.interphoneType == InterphoneType.FREEVIEW.ToString()) |
| | | { |
| | | #if __IOS__ |
| | | try |
| | | { |
| | | FunctionList.List.videoIntercom.Remove(video); |
| | | --i; |
| | | }catch(Exception ex) |
| | | { |
| | | MainPage.Log($"ios 全视通异常 : {ex.Message}"); |
| | | } |
| | | |
| | | #else |
| | | //为全视通可视对讲 |
| | | //DB_ResidenceData.Instance.SupportFacePass = true; |
| | | //Entity.DB_ResidenceData.Instance.SupportVisitorManage = true; |
| | | //Entity.DB_ResidenceData.Instance.SupportFVDevice = true; |
| | | //isInterphoneType_FREEVIEW = true; |
| | | DB_ResidenceData.Instance.SupportFacePass = true; |
| | | Entity.DB_ResidenceData.Instance.SupportVisitorManage = true; |
| | | Entity.DB_ResidenceData.Instance.SupportFVDevice = true; |
| | | isInterphoneType_FREEVIEW = true; |
| | | #endif |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | //======================群控==================== |
| | | if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl) |
| | | { |
| | | var pack = Ins.HttpRequest.GetGroupControlList(); |
| | |
| | | } |
| | | readSidList.Clear(); |
| | | } |
| | | //FunctionList.List.Functions.AddRange(FunctionList.List.groupControls); |
| | | } |
| | | if (readSidList.Count > 0) |
| | | { |