| | |
| | | d.Add("QueryType", queryType); |
| | | d.Add("loopId", loopId); |
| | | d.Add("NowMonth", nowMonth); |
| | | d.Add("MAC", DB_ResidenceData.residenceData.residenceGatewayMAC); |
| | | d.Add("MAC", DB_ResidenceData.Instance.residenceGatewayMAC); |
| | | d.Add("LocalTimeZone", 8); |
| | | var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d); |
| | | return RequestHttps("https://developer.hdlcontrol.com/api/GetSensorPushHistory", jsonString, true); |
| | |
| | | UserInfo.Current.userEmailInfo = info.memberEmail; |
| | | UserInfo.Current.userMobileInfo = info.memberPhone; |
| | | UserInfo.Current.userName = info.memberName; |
| | | |
| | | if (!string.IsNullOrEmpty(info.memberPhonePrefix)) |
| | | { |
| | | UserInfo.Current.areaCode = info.memberPhonePrefix; |
| | |
| | | //是否需要获取头像 |
| | | if (bGetHeadImage) |
| | | { |
| | | var imageKey = ImageUtlis.Current.GetHeadImageKey(info.memberId); |
| | | |
| | | var headImageBytes = ImageUtlis.Current.DownHeadImage(info.memberId); |
| | | |
| | | if (headImageBytes != null && headImageBytes.Length > 0) |
| | | //2020-12-15 修改头像方案 |
| | | if (!string.IsNullOrEmpty(info.memberHeadIcon)) |
| | | { |
| | | //UserInfo.Current.headImagePageBytes = headImageBytes; |
| | | UserInfo.Current.headImagePagePath = imageKey; |
| | | var headImageBytes = ImageUtlis.Current.DownHeadImageByImageKey(info.memberHeadIcon); |
| | | |
| | | if (headImageBytes != null && headImageBytes.Length > 0) |
| | | { |
| | | UserInfo.Current.headImagePagePath = info.memberHeadIcon; |
| | | //UserInfo.Current.headImagePagePath = imageKey; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | /// 获取用户头像 |
| | | /// </summary> |
| | | /// <param name="userId"></param> |
| | | public void GetUserHeadImage(string userId) |
| | | public void GetUserHeadImageByKey(string imageKey) |
| | | { |
| | | var imageKey = ImageUtlis.Current.GetHeadImageKey(userId); |
| | | |
| | | var headImageBytes = ImageUtlis.Current.DownHeadImage(userId); |
| | | var headImageBytes = ImageUtlis.Current.DownHeadImageByImageKey(imageKey); |
| | | |
| | | if (headImageBytes != null && headImageBytes.Length > 0) |
| | | { |
| | |
| | | }); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_Member_UpdateMemberInfo, requestJson); |
| | | } |
| | | |
| | | ///// <summary> |
| | | ///// 更新用户头像 |
| | | ///// </summary> |
| | | ///// <param name="userName"></param> |
| | | ///// <returns></returns> |
| | | //public ResponsePackNew UpdateMemberHeadIcon(string memberHeadIcon) |
| | | //{ |
| | | // var requestJson = HttpUtil.GetSignRequestJson(new UpdateMemberHeadIconRes() |
| | | // { |
| | | // memberHeadIcon = memberHeadIcon |
| | | // }); |
| | | // return HttpUtil.RequestHttpsPost(NewAPI.API_POST_Member_UpdateMemberInfo, requestJson); |
| | | //} |
| | | |
| | | ///// <summary> |
| | | ///// 更新用户头像 |
| | |
| | | homeRegionName = mHome.homeRegionName, |
| | | homeRegionId = mHome.homeRegionId, |
| | | Address = mHome.homeAddress, |
| | | isAllowCreateScene = mHome.isAllowCreateScene, |
| | | }; |
| | | UserInfo.Current.regionList.Add(home); |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(UserInfo.Current.CurReginID)) |
| | | //-------如果账号是首次登录 |
| | | if (DB_ResidenceData.Instance.CurrentRegion == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.RegionID)) |
| | | { |
| | | UserInfo.Current.CurReginID = UserInfo.Current.regionList[0].RegionID; |
| | | //恢复备份 |
| | | //HDLCommon.Current.RestoreHomeBackup(DB_ResidenceData.residenceData.CurReginID); |
| | | //刷新当前住宅 |
| | | DB_ResidenceData.Instance.CurrentRegion = UserInfo.Current.regionList[0]; |
| | | DB_ResidenceData.Instance.SaveResidenceData(); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | //刷新一次住宅网关 |
| | | GetHomeGatewayList(); |
| | | } |
| | | else |
| | | { |
| | | var curRegion = UserInfo.Current.regionList.Find((obj) => obj.RegionID == UserInfo.Current.CurReginID); |
| | | if(curRegion == null) |
| | | //住宅被删除 |
| | | var findHome = UserInfo.Current.regionList.Find((obj) => obj.RegionID == DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | if (findHome == null) |
| | | { |
| | | UserInfo.Current.CurReginID = UserInfo.Current.regionList[0].RegionID; |
| | | //恢复备份 |
| | | //HDLCommon.Current.RestoreHomeBackup(DB_ResidenceData.residenceData.CurReginID); |
| | | Shared.Application.RunOnMainThread(() => |
| | | { |
| | | DB_ResidenceData.Instance.CurrentRegion = UserInfo.Current.regionList[0]; |
| | | GetHomeGatewayList(); |
| | | DB_ResidenceData.Instance.SaveResidenceData(); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | Action action = () => |
| | | { |
| | | MainPage.GoUserPage(); |
| | | }; |
| | | new UI.PublicAssmebly().TipMsg(StringId.Tip, StringId.ResidenceDeletedSwitchToAnotherResidence, action); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | //刷新当前住宅 |
| | | DB_ResidenceData.Instance.CurrentRegion = findHome; |
| | | DB_ResidenceData.Instance.SaveResidenceData(); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | //刷新一次住宅网关 |
| | | GetHomeGatewayList(); |
| | | } |
| | | } |
| | | |
| | | |
| | | DB_ResidenceData.residenceData.SaveResidenceData(); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | |
| | | //刷新一次住宅网关 |
| | | GetHomeGatewayList(); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | var requestObj = new AddOrUpdateHomeObj() |
| | | { |
| | | homeId = DB_ResidenceData.residenceData.residecenInfo.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | }; |
| | | |
| | | if (editId == 0) |
| | |
| | | { |
| | | try |
| | | { |
| | | if (string.IsNullOrEmpty(DB_ResidenceData.residenceData.residecenInfo.RegionID)) return; |
| | | var nowhomeId = DB_ResidenceData.residenceData.residecenInfo.RegionID; |
| | | if (string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.RegionID)) return; |
| | | var nowhomeId = DB_ResidenceData.Instance.CurrentRegion.RegionID; |
| | | var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = nowhomeId }); |
| | | var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_GetGatewayList, requestJson); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | | var mHomeGatewayRes = Newtonsoft.Json.JsonConvert.DeserializeObject<List<HomeGatewayInfo>>(revertObj.Data.ToString()); |
| | | if (nowhomeId == DB_ResidenceData.residenceData.residecenInfo.RegionID) |
| | | if (nowhomeId == DB_ResidenceData.Instance.CurrentRegion.RegionID) |
| | | { |
| | | if (mHomeGatewayRes != null) |
| | | { |
| | | if (mHomeGatewayRes.Count > 0) |
| | | { |
| | | DB_ResidenceData.residenceData.HomeGateway = mHomeGatewayRes[0]; |
| | | if(mHomeGatewayRes[0].gatewayStatus == "ON_LINE") |
| | | DB_ResidenceData.Instance.HomeGateway = mHomeGatewayRes[0]; |
| | | if(mHomeGatewayRes[0].gatewayStatus) |
| | | { |
| | | DriverLayer.Control.Ins.IsRemote = true; |
| | | //DriverLayer.Control.Ins.IsRemote = true; |
| | | DriverLayer.Control.Ins.GatewayOnline = true; |
| | | } |
| | | DB_ResidenceData.residenceData.SaveResidenceData(); |
| | | else |
| | | { |
| | | DriverLayer.Control.Ins.GatewayOnline = false; |
| | | } |
| | | DB_ResidenceData.Instance.SaveResidenceData(); |
| | | return; |
| | | } |
| | | } |
| | | //其余情况清空网关信息 |
| | | DB_ResidenceData.residenceData.HomeGateway = null; |
| | | DB_ResidenceData.residenceData.SaveResidenceData(); |
| | | DB_ResidenceData.Instance.HomeGateway = null; |
| | | DB_ResidenceData.Instance.SaveResidenceData(); |
| | | } |
| | | } |
| | | else |
| | |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetResidenceMemberAccount() |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = DB_ResidenceData.residenceData.residecenInfo.RegionID }); |
| | | var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID }); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_FindAll, requestJson); |
| | | } |
| | | |
| | |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildNickNameObj() |
| | | { |
| | | homeId = DB_ResidenceData.residenceData.residecenInfo.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | childAccountId = childAccountId, |
| | | nickName = nickName, |
| | | }); |
| | |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildAllowCreateSceneObj() |
| | | { |
| | | homeId = DB_ResidenceData.residenceData.residecenInfo.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | childAccountId = childAccountId, |
| | | isAllowCreateScene = isAllow, |
| | | }); |
| | |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new GetShareObj() |
| | | { |
| | | homeId = DB_ResidenceData.residenceData.residecenInfo.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | childAccountId = childAccountId, |
| | | }); |
| | | |
| | |
| | | public ResponsePackNew BindResidenceMemberAccount(string subAccount, string nickName) |
| | | { |
| | | //添加子账号 |
| | | var requestObj = new ChildAddObj() { homeId = DB_ResidenceData.residenceData.residecenInfo.RegionID, account = subAccount, nickName = nickName }; |
| | | var requestObj = new ChildAddObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, account = subAccount, nickName = nickName }; |
| | | var requestJson = HttpUtil.GetSignRequestJson(requestObj); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Add, requestJson); |
| | | |
| | |
| | | attachClientId = attachClientId, |
| | | homeType = HomeTypeEnum.BUSPRO.ToString() |
| | | }); |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_GetMqttRemoteInfo, requestJson, DB_ResidenceData.residenceData.residecenInfo.regionUrl); |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_GetMqttRemoteInfo, requestJson, DB_ResidenceData.Instance.CurrentRegion.regionUrl); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | | return Newtonsoft.Json.JsonConvert.DeserializeObject<MqttInfo>(revertObj.Data.ToString()); |
| | |
| | | isProduce = false; |
| | | #endif |
| | | |
| | | if (string.IsNullOrEmpty(UserInfo.Current.PushDeviceToken)) { |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushDeviceToken)) { |
| | | Utlis.WriteLine("PushDeviceToken 为空"); |
| | | return false; |
| | | } |
| | | |
| | | var mAddpushinfoObj = new AddpushinfoObj() |
| | | { |
| | | pushToken = UserInfo.Current.PushDeviceToken, |
| | | deviceName = UserInfo.Current.PhoneName, |
| | | pushToken = OnAppConfig.Instance.PushDeviceToken, |
| | | deviceName = OnAppConfig.Instance.PhoneName, |
| | | deviceType = deviceType, |
| | | produce = isProduce, |
| | | }; |
| | |
| | | var pushId = revertObj.Data.ToString(); |
| | | if (!string.IsNullOrEmpty(pushId)) |
| | | { |
| | | UserInfo.Current.PushId = pushId; |
| | | UserInfo.Current.SaveUserInfo(); |
| | | OnAppConfig.Instance.PushId = pushId; |
| | | OnAppConfig.Instance.SaveConfig(); |
| | | Utlis.WriteLine("PushId: " + pushId); |
| | | |
| | | return true; |
| | |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(new GetMessageListObj() |
| | | { |
| | | pushId = UserInfo.Current.PushId, |
| | | pushId = OnAppConfig.Instance.PushId, |
| | | pushType = pushType |
| | | }); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Getpushmessagelist, requestJson); |
| | |
| | | /// <returns></returns> |
| | | public bool PushSerivceClearmessagelist() |
| | | { |
| | | if (string.IsNullOrEmpty(UserInfo.Current.PushId)) return false; |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false; |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(new PushIdObj() |
| | | { |
| | | pushId = UserInfo.Current.PushId |
| | | pushId = OnAppConfig.Instance.PushId |
| | | }); |
| | | |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Clearmessagelist, requestJson); |
| | |
| | | /// <returns></returns> |
| | | public bool PushSerivceSignOut() |
| | | { |
| | | if (string.IsNullOrEmpty(UserInfo.Current.PushId)) return false; |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false; |
| | | try |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new PushIdObj() { |
| | | pushId = UserInfo.Current.PushId |
| | | pushId = OnAppConfig.Instance.PushId |
| | | }); |
| | | |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_DeleteToken, requestJson); |
| | |
| | | /// <returns></returns> |
| | | public bool PushSerivceMarkAllMessageRead() |
| | | { |
| | | if (string.IsNullOrEmpty(UserInfo.Current.PushId)) return false; |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false; |
| | | |
| | | try |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new PushIdObj() |
| | | { |
| | | pushId = UserInfo.Current.PushId |
| | | pushId = OnAppConfig.Instance.PushId |
| | | }); |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_ALLMarkread, requestJson); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | |
| | | /// <returns></returns> |
| | | public bool PushSerivceMarkMessageRead(string msgId) |
| | | { |
| | | if (string.IsNullOrEmpty(UserInfo.Current.PushId)) return false; |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false; |
| | | |
| | | try |
| | | { |
| | |
| | | /// <returns></returns> |
| | | public bool PushSerivceDeleteMessage(string msgId) |
| | | { |
| | | if (string.IsNullOrEmpty(UserInfo.Current.PushId)) return false; |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false; |
| | | |
| | | try |
| | | { |
| | |
| | | public ResponsePackNew GetDeviceList() |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | //d.Add("gatewayId", DB_ResidenceData.residenceData.HomeGateway.gatewayId); |
| | | //d.Add("roomId", DB_ResidenceData.residenceData.residecenInfo.RegionID);//可控参数,当需要分页获取,怎么知道分页总数 |
| | | //d.Add("searchType", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | |
| | | public ResponsePackNew GetDeviceInfoList(List<string> functionIds) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("deviceIds", functionIds); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew RefreshDeviceStatus(List<string> functionIds) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("deviceIds", functionIds); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew ControlDevice(List<ApiAlinkControlActionObj> actionObjs) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("gatewayId", DB_ResidenceData.residenceData.HomeGateway.gatewayId);//DriverLayer.Control.Ins.GatewayId); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);//DriverLayer.Control.Ins.GatewayId); |
| | | d.Add("actions", actionObjs); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew UpdataDevcieInfo(Function function) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("deviceId", function.deviceId);//DriverLayer.Control.Ins.GatewayId); |
| | | d.Add("name", function.name); |
| | | d.Add("collect", function.collect); |
| | |
| | | public ResponsePackNew BindDeviceToRoom(List<string> deviceIds,List<string> roomIds) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("deviceIds", deviceIds); |
| | | d.Add("roomIds", roomIds); |
| | | |
| | |
| | | public string UnbindDeviceToRoom(string deviceId, string roomId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("deviceIds", new List<string>() { deviceId }); |
| | | d.Add("roomIds", new List<string>() { roomId }); |
| | | |
| | |
| | | public string EditDeviceName(string deviceId, string deviceName) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("name", deviceName); |
| | | |
| | |
| | | public ResponsePackNew CollectDevice(string deviceId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("deviceIds",new List<string>() { deviceId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew CancelCollectDevice(string deviceId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("deviceIds", new List<string>() { deviceId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew GetSceneList(string roomId = null) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | if (roomId != null) |
| | | { |
| | | d.Add("roomId", roomId); |
| | |
| | | d.Add("userSceneIds",new List<string>() { seceneId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetSecneList, requestJson); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetSecneInfo, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 添加场景 |
| | |
| | | public ResponsePackNew AddScene(Scene scene) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("scenes", new List<Scene>() { scene }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew EditScene(Scene scene) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("scenes", new List<Scene>() { scene }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public string DeleteScene(string userSceneId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("userSceneIds", new List<string>() { userSceneId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public string ExecuteScene(string userSceneId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("userSceneIds", new List<string>() { userSceneId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public string CollectScene(string userSceneId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("userSceneIds", new List<string>() { userSceneId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public string CancelCollectScene(string userSceneId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("userSceneIds", new List<string>() { userSceneId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew GetRoomList(string GetType = "All") |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | if (GetType != "All") |
| | | { |
| | | d.Add("roomType", GetType); |
| | | } |
| | | d.Add("pageSize", "1000"); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetRoomList, requestJson); |
| | | |
| | |
| | | public ResponsePackNew AddRoom(List<SpatialInfo> rooms) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("rooms", rooms); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew UpdateRoom(List<SpatialInfo> rooms) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("rooms", rooms); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew DeleteRoom(List<string> roomIds) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("ids", roomIds); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |