From 19397c2a95efa904cccaf299363dc0111af28042 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 07 八月 2023 19:47:53 +0800
Subject: [PATCH] 2023年08月07日19:47:43
---
HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs | 37 +++
HDL_ON/DAL/Server/NewAPI.cs | 52 ++++
HDL_ON/UI/UI2/FuntionControlView/Aks/SendMethod.cs | 395 ++++++++++++++++++++++++++++++++
HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/AksEntiy.cs | 11
HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/FilterCategoryEntity.cs | 53 ++++
HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/SequencerEntity.cs | 25 ++
HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/MovieLibraryInfoEntity.cs | 65 +++++
HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/MovieLibraryEntity.cs | 53 ++++
HDL_ON/HDL_ON.projitems | 9
HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/KeypadEntity.cs | 18 +
HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs | 2
11 files changed, 717 insertions(+), 3 deletions(-)
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index 2eca374..9a8e150 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -521,12 +521,60 @@
/// <summary>
/// 闂ㄩ攣鍨嬪彿鍒楄〃锛堣悿鐭宠棰戦棬閿侊級
/// </summary>
- public const string Api_Post_Lock_Models = "/home-wisdom/platform/yingshi/lock/models";
-
+ public const string Api_Post_Lock_Models = "/home-wisdom/platform/yingshi/lock/models";
+
+ #endregion
+
+
+
+ #region Kaede -- 鍩冨厠鏂帴鍙___________________________
+ /// <summary>
+ /// 鑾峰彇閬ユ帶鍣ㄥ垪琛�
+ /// </summary>
+ public const string Api_Post_Aks_Controlist = "/home-wisdom/app/device/avcc/remoteControl/list";
+ /// <summary>
+ /// 閬ユ帶鍣ㄦ寜閿墽琛�
+ /// </summary>
+ public const string Api_Post_Aks_KeypadExecute = "/home-wisdom/app/device/avcc/remoteControl/keypadExecute";
+ /// <summary>
+ /// 鑾峰彇鏃跺簭鍣�
+ /// </summary>
+ public const string Api_Post_Aks_XsqList = "/home-wisdom/app/device/avcc/sequencer/list";
+ /// <summary>
+ /// 鏃跺簭鍣ㄦ墽琛�
+ /// </summary>
+ public const string Api_Post_Aks_XsqExecute = "/home-wisdom/app/device/avcc/sequencer/execute";
+ /// <summary>
+ /// 鑾峰彇褰卞簱杩囨护鍒嗙被
+ /// </summary>
+ public const string Api_Post_Aks_FilterCategory = "/home-wisdom/app/device/avcc/movieLibrary/filterCategory";
+ /// <summary>
+ /// 褰辩墖鍒嗛〉鑾峰彇
+ /// </summary>
+ public const string Api_Post_Aks_MovieLibraryPage = "/home-wisdom/app/device/avcc/movieLibrary/page";
+ /// <summary>
+ /// 褰辩墖璇︽儏鑾峰彇
+ /// </summary>
+ public const string Api_Post_Aks_MovieLibraryInfo= "/home-wisdom/app/device/avcc/movieLibrary/info";
+ /// <summary>
+ /// 褰辩墖鏀惰棌/鍙栨秷鏀惰棌
+ /// </summary>
+ public const string Api_Post_Aks_MovieLibraryCollect = "/home-wisdom/app/device/avcc/movieLibrary/Collect";
+ /// <summary>
+ /// 鏀惰棌褰辩墖鍒嗛〉鑾峰彇
+ /// </summary>
+ public const string Api_Post_Aks_MovieLibraryCollectPage = "/home-wisdom/app/device/avcc/movieLibrary/collectPage";
+ /// <summary>
+ /// 褰辩墖鎾斁
+ /// </summary>
+ public const string Api_Post_Aks_MovieLibraryPlay= "/home-wisdom/app/device/avcc/movieLibrary/play";
+
+
+
#endregion
#region Kaede -- 鍦烘櫙鎺ュ彛____________________________
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index 1e5b09f..21d3415 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -585,6 +585,14 @@
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\GfPage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\TyyPage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\YkqPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\SendMethod.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\AksEntiy.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\RemoteControlEntity.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\SequencerEntity.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\FilterCategoryEntity.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\KeypadEntity.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\MovieLibraryEntity.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\MovieLibraryInfoEntity.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
@@ -616,5 +624,6 @@
<Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\CombinedDimming\" />
<Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\" />
<Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\" />
+ <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\" />
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/AksEntiy.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/AksEntiy.cs
new file mode 100644
index 0000000..e579cec
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/AksEntiy.cs
@@ -0,0 +1,11 @@
+锘縰sing System;
+namespace HDL_ON.UI.UI2.FuntionControlView.Aks.Entity
+{
+ public class AksEntiy
+ {
+ public AksEntiy()
+ {
+ }
+
+ }
+}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/FilterCategoryEntity.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/FilterCategoryEntity.cs
new file mode 100644
index 0000000..eaad718
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/FilterCategoryEntity.cs
@@ -0,0 +1,53 @@
+锘縰sing System;
+using System.Collections.Generic;
+
+namespace HDL_ON.UI.UI2.FuntionControlView.Aks.Entity
+{
+ /// <summary>
+ /// 褰卞簱鍒嗙被瀹炰綋
+ /// </summary>
+ public class FilterCategoryEntity
+ {
+ /// <summary>
+ /// 鍒嗙被鏍囪瘑
+ /// </summary>
+ public string category = string.Empty;
+ /// <summary>
+ /// 鍒嗙被鍚嶇О(涓�绾�)
+ /// </summary>
+ public string name = string.Empty;
+
+ public List<Filters> filters = new List<Filters>();
+
+ }
+ /// <summary>
+ /// 鍒嗙被杩囨护
+ /// </summary>
+ public class Filters
+ {
+ /// <summary>
+ /// 鍒嗙被杩囨护鍊�
+ /// </summary>
+ public string filterValue = string.Empty;
+ /// <summary>
+ /// 鍒嗙被杩囧悕绉�(浜岀骇)
+ /// </summary>
+ public string filterName = string.Empty;
+ }
+
+
+ /// <summary>
+ /// 鍒嗙被杩囨护
+ /// </summary>
+ public class FilterCategorys
+ {
+ /// <summary>
+ /// 鍒嗙被鏍囪瘑
+ /// </summary>
+ public string category = string.Empty;
+ /// <summary>
+ /// 鍒嗙被杩囨护鍊�
+ /// </summary>
+ public string filterValue = string.Empty;
+ }
+}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/KeypadEntity.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/KeypadEntity.cs
new file mode 100644
index 0000000..7bbfc12
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/KeypadEntity.cs
@@ -0,0 +1,18 @@
+锘縰sing System;
+namespace HDL_ON.UI.UI2.FuntionControlView.Aks.Entity
+{
+ /// <summary>
+ /// 鎸夐敭瀹炰綋
+ /// </summary>
+ public class KeypadEntity
+ {
+ /// <summary>
+ /// 鎸夐敭璇嗗埆鐮�
+ /// </summary>
+ public string keypad = string.Empty;
+ /// <summary>
+ /// 鎸夐敭鍚嶇О
+ /// </summary>
+ public string name = string.Empty;
+ }
+}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/MovieLibraryEntity.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/MovieLibraryEntity.cs
new file mode 100644
index 0000000..47cdcca
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/MovieLibraryEntity.cs
@@ -0,0 +1,53 @@
+锘縰sing System;
+using System.Collections.Generic;
+namespace HDL_ON.UI.UI2.FuntionControlView.Aks.Entity
+{
+ /// <summary>
+ /// 褰辩墖鍒嗛〉鑾峰彇瀹炰綋
+ /// </summary>
+ public class MovieLibraryEntity
+ {
+
+ public List<MovieLibrary> list = new List<MovieLibrary>();
+ /// <summary>
+ /// 鎬绘潯鏁�
+ /// </summary>
+ public long totalCount;
+ /// <summary>
+ /// 鎬婚〉鏁�
+ /// </summary>
+ public long totalPage;
+ /// <summary>
+ /// 褰撳墠椤�
+ /// </summary>
+ public long pageNo;
+ /// <summary>
+ /// 椤垫暟
+ /// </summary>
+ public long pageSize;
+
+
+
+ }
+
+ public class MovieLibrary
+ {
+ /// <summary>
+ /// 褰辩墖id
+ /// </summary>
+ public string movieId = string.Empty;
+ /// <summary>
+ /// 褰辩墖鍚嶇О
+ /// </summary>
+ public string name = string.Empty;
+ /// <summary>
+ /// 褰辩墖娴锋姤鍥剧墖
+ /// </summary>
+ public string posterUrl = string.Empty;
+ /// <summary>
+ /// 璇勫垎
+ /// </summary>
+ public string rating = string.Empty;
+
+ }
+}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/MovieLibraryInfoEntity.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/MovieLibraryInfoEntity.cs
new file mode 100644
index 0000000..14d1cc6
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/MovieLibraryInfoEntity.cs
@@ -0,0 +1,65 @@
+锘縰sing System;
+using System.Collections.Generic;
+namespace HDL_ON.UI.UI2.FuntionControlView.Aks.Entity
+{
+ /// <summary>
+ /// 褰辩墖璇︽儏瀹炰綋
+ /// </summary>
+ public class MovieLibraryInfoEntity
+ {
+
+ /// <summary>
+ /// 褰辩墖id
+ /// </summary>
+ public string movieId = string.Empty;
+ /// <summary>
+ /// 褰辩墖鍚嶇О
+ /// </summary>
+ public string name = string.Empty;
+ /// <summary>
+ /// 鏀惰棌鐘舵��
+ /// </summary>
+ public bool collect;
+ /// <summary>
+ /// 褰辩墖娴锋姤鍥剧墖鍦板潃
+ /// </summary>
+ public string posterUrl = string.Empty;
+ /// <summary>
+ /// 涓婃槧鏃堕棿
+ /// </summary>
+ public string releaseDate = string.Empty;
+ /// <summary>
+ /// 鍦板尯
+ /// </summary>
+ public string area = string.Empty;
+ /// <summary>
+ /// 璇勫垎
+ /// </summary>
+ public string rating = string.Empty;
+ /// <summary>
+ /// 绠�浠�
+ /// </summary>
+ public string introduction = string.Empty;
+ /// <summary>
+ /// 涓绘紨鍒楄〃
+ /// </summary>
+ public List<Actors> actors = new List<Actors>();
+
+
+ }
+
+
+ public class Actors
+ {
+ /// <summary>
+ /// 涓绘紨鍥剧墖鍦板潃
+ /// </summary>
+ public string actorUrl = string.Empty;
+ /// <summary>
+ /// 涓绘紨鍚嶇О
+ /// </summary>
+ public string actorName = string.Empty;
+
+ }
+
+}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs
new file mode 100644
index 0000000..51dc9f0
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs
@@ -0,0 +1,37 @@
+锘縰sing System;
+using System.Collections.Generic;
+
+namespace HDL_ON.UI.UI2.FuntionControlView.Aks.Entity
+{
+ /// <summary>
+ /// 閬ユ帶鍣ㄥ疄浣�
+ /// </summary>
+ public class RemoteControlEntity
+ {
+
+ /// <summary>
+ /// 1 = 鎾斁鍣�
+ ///2 = 鍔熸斁
+ ///3 = 鐢佃
+ ///4 = 鏈洪《鐩�
+ ///5 = 鎶曞奖浠�
+ ///6 = 涓囪兘閬ユ帶鍣�
+ /// </summary>
+ public int type;
+ /// <summary>
+ /// 閬ユ帶鍣╥d
+ /// </summary>
+ public string rcId = string.Empty;
+ /// <summary>
+ /// 閬ユ帶鍣ㄥ悕绉�
+ /// </summary>
+ public string name = string.Empty;
+ /// <summary>
+ /// 鎸夐敭鍒楄〃
+ /// </summary>
+ public List<KeypadEntity> keypads = new List<KeypadEntity>();
+
+ }
+
+
+}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/SequencerEntity.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/SequencerEntity.cs
new file mode 100644
index 0000000..7e1d3a7
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/SequencerEntity.cs
@@ -0,0 +1,25 @@
+锘縰sing System;
+namespace HDL_ON.UI.UI2.FuntionControlView.Aks.Entity
+{
+ /// <summary>
+ /// 鏃跺簭鍣ㄥ疄浣�
+ /// </summary>
+ public class SequencerEntity
+ {
+ /// <summary>
+ ///1 = 鏍囧噯
+ ///2 = 鑷畾涔�
+ /// </summary>
+ public int type;
+ /// <summary>
+ /// 鏃跺簭鍣╥d
+ /// </summary>
+ public string seqId = string.Empty;
+ /// <summary>
+ /// 鏃跺簭鍣ㄥ悕绉�
+ /// </summary>
+ public string name = string.Empty;
+
+
+ }
+}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs
index 074db3e..bf68ccb 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs
@@ -121,7 +121,7 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = MusicColor.TextColor,
TextSize = TextSize.Text16,
- TextID = StringId.dianshi,
+ TextID = StringId.jidinghe,
};
this.AddChidren(btnTitle);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/SendMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/SendMethod.cs
new file mode 100644
index 0000000..0409d16
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/SendMethod.cs
@@ -0,0 +1,395 @@
+锘縰sing System;
+using Shared;
+using System.Collections.Generic;
+using static HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod;
+using HDL_ON.DAL.Server;
+using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock;
+using HDL_ON.Entity;
+using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity;
+using Newtonsoft.Json.Linq;
+
+namespace HDL_ON.UI.UI2.FuntionControlView.Aks
+{
+ public class SendMethod
+ {
+ public SendMethod()
+ {
+ }
+
+ private static SendMethod sendMethod = null;
+ /// <summary>
+ /// 鑾峰彇瀵硅薄
+ /// </summary>
+ public static SendMethod Current
+ {
+ get
+ {
+ if (sendMethod == null)
+ {
+ sendMethod = new SendMethod();
+ }
+
+ return sendMethod;
+
+ }
+
+ }
+
+
+ #region ------鏃跺簭鍣�-------
+ /// <summary>
+ /// 鑾峰彇鏃跺簭鍣ㄥ垪琛�
+ /// </summary>
+ /// <param name="deviceId">璁惧id</param>
+ /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param>
+ /// <returns>杩斿洖缁撴灉涓嶄細涓簄ull</returns>
+ public List<SequencerEntity> GetSequencerLits(string deviceId, TipType tipType = TipType.flicker)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_Aks_XsqList, "鑾峰彇鏃跺簭鍣ㄥ垪琛�");
+ if (!this.DataChecking(responsePackNew, tipType))
+ {
+ return new List<SequencerEntity>();
+ }
+ var List = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SequencerEntity>>(responsePackNew.Data.ToString());
+ if (List == null)
+ {
+ return new List<SequencerEntity>();
+ }
+ return List;
+ }
+
+ /// <summary>
+ /// 鏃跺簭鍣ㄦ墽琛�
+ /// </summary>
+ /// <param name="deviceId">璁惧id</param>
+ /// <param name="seqId">鏃跺簭鍣╥d</param>
+ /// <param name="onOff">鏃跺簭鍣ㄥ紑鍏�</param>
+ /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param>
+ public bool SequencerExecute(string deviceId, string seqId, string onOff, TipType tipType = TipType.flicker)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("seqId", seqId);//鏃跺簭鍣╥d
+ d.Add("onOff", onOff);//鏃跺簭鍣ㄥ紑鍏�
+ //d.Add("zoneType", deviceId);//鍖哄煙
+ var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_Aks_XsqExecute, "鏃跺簭鍣ㄦ墽琛�");
+ if (!this.DataChecking(responsePackNew, tipType))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ #endregion
+
+
+ #region ------閬ユ帶鍣�-------
+ /// <summary>
+ ///鑾峰彇閬ユ帶鍣ㄥ垪琛�
+ /// </summary>
+ /// <param name="deviceId">璁惧id</param>
+ /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param>
+ /// <returns>杩斿洖缁撴灉涓嶄細涓簄ull</returns>
+ public List<RemoteControlEntity> GetRemoteControlLits(string deviceId,TipType tipType = TipType.flicker)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_Aks_Controlist, "鑾峰彇閬ユ帶鍣ㄥ垪琛�");
+ if (!this.DataChecking(responsePackNew, tipType))
+ {
+ return new List<RemoteControlEntity>();
+ }
+ var RemoteControlEntityList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RemoteControlEntity>>(responsePackNew.Data.ToString());
+ if (RemoteControlEntityList == null)
+ {
+ return new List<RemoteControlEntity>();
+ }
+ return RemoteControlEntityList;
+ }
+
+ /// <summary>
+ ///閬ユ帶鍣ㄦ寜閿墽琛�
+ /// </summary>
+ /// <param name="deviceId">璁惧id</param>
+ /// <param name="rcId">閬ユ帶鍣╥d</param>
+ /// <param name="keypad"><鎸夐敭鏍囪瘑/param>
+ /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param>
+ public bool KeypadExecute(string deviceId, string rcId, string keypad, TipType tipType = TipType.flicker)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);//璁惧id
+ d.Add("rcId", rcId);//閬ユ帶鍣╥d
+ d.Add("keypad", keypad);//鎸夐敭鏍囪瘑
+ //d.Add("zoneType", deviceId);//鍖哄煙
+ var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d,NewAPI.Api_Post_Aks_KeypadExecute, "閬ユ帶鍣ㄦ寜閿墽琛�");
+ if (!this.DataChecking(responsePackNew, tipType))
+ {
+ return false;
+ }
+ return true;
+ }
+ #endregion
+
+
+ #region ------褰卞簱-------
+ /// <summary>
+ ///鑾峰彇褰卞簱杩囨护鍒嗙被
+ /// </summary>
+ /// <param name="deviceId">璁惧id</param>
+ /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param>
+ /// <returns>杩斿洖缁撴灉涓嶄細涓簄ull</returns>
+ public List<FilterCategoryEntity> GetFilterCategoryLits(string deviceId, string rcId, TipType tipType = TipType.flicker)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);//璁惧id
+ d.Add("rcId", rcId);//閬ユ帶鍣╥d
+ //d.Add("zoneType", deviceId);//鍖哄煙
+ var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_Aks_FilterCategory, "鑾峰彇褰卞簱杩囨护鍒嗙被");
+ if (!this.DataChecking(responsePackNew, tipType))
+ {
+ return new List<FilterCategoryEntity>();
+ }
+ var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<FilterCategoryEntity>>(responsePackNew.Data.ToString());
+ if (list == null)
+ {
+ return new List<FilterCategoryEntity>();
+ }
+ return list;
+ }
+
+ /// <summary>
+ /// 褰辩墖鍒嗛〉鑾峰彇
+ /// </summary>
+ /// <param name="deviceId">璁惧id</param>
+ /// <param name="rcId">閬ユ帶鍣╥d</param>
+ /// <param name="filterCategorys">杩囨护鏁版嵁</param>
+ /// <param name="pageNo">褰撳墠椤�</param>
+ /// <param name="pageSize">椤垫暟</param>
+ /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param>
+ public List<MovieLibrary> GetMovieLibraryPage(string deviceId, string rcId, List<FilterCategorys> filterCategorys, int pageNo, int pageSize, TipType tipType = TipType.flicker)
+ {
+
+ JObject jObject = new JObject();
+ JArray jArray = new JArray();
+ jObject.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ jObject.Add("deviceId", deviceId);//璁惧id
+ jObject.Add("rcId", rcId);//閬ユ帶鍣╥d
+
+ foreach (var filter in filterCategorys)
+ {
+ JObject obj = new JObject();
+ obj.Add("category", filter.category);
+ obj.Add("filterValue", filter.filterValue);
+ jArray.Add(obj);
+ }
+ jObject.Add("filterCategorys", jArray);//鎸夐敭鏍囪瘑
+ jObject.Add("pageNo", pageNo);//褰撳墠椤�
+ jObject.Add("pageSize", pageSize);//椤垫暟
+ //d.Add("zoneType", deviceId);//鍖哄煙
+ var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(jObject.ToString(), NewAPI.Api_Post_Aks_MovieLibraryPage, "褰辩墖鍒嗛〉鑾峰彇");
+ if (!this.DataChecking(responsePackNew, tipType))
+ {
+ return new List<MovieLibrary>();
+ }
+ var movieLibraryEntity = Newtonsoft.Json.JsonConvert.DeserializeObject<MovieLibraryEntity>(responsePackNew.Data.ToString());
+ if (movieLibraryEntity == null)
+ {
+ return new List<MovieLibrary>();
+ }
+ return movieLibraryEntity.list;
+ }
+
+
+
+ /// <summary>
+ /// 褰辩墖璇︽儏鑾峰彇
+ /// </summary>
+ /// <param name="deviceId">璁惧id</param>
+ /// <param name="rcId">閬ユ帶鍣╥d</param>
+ /// <param name="movieId">褰辩墖id</param>
+ /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param>
+ public MovieLibraryInfoEntity GetMovieLibraryInfo(string deviceId, string rcId, string movieId, TipType tipType = TipType.flicker)
+ {
+
+ JObject jObject = new JObject();
+ jObject.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ jObject.Add("deviceId", deviceId);//璁惧id
+ jObject.Add("rcId", rcId);//閬ユ帶鍣╥d
+ jObject.Add("movieId", movieId);//褰辩墖id
+ //d.Add("zoneType", deviceId);//鍖哄煙
+
+ var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(jObject.ToString(), NewAPI.Api_Post_Aks_MovieLibraryInfo, "褰辩墖璇︽儏鑾峰彇");
+ if (!this.DataChecking(responsePackNew, tipType))
+ {
+ return new MovieLibraryInfoEntity();
+ }
+ var movieLibraryEntity = Newtonsoft.Json.JsonConvert.DeserializeObject<MovieLibraryInfoEntity>(responsePackNew.Data.ToString());
+ if (movieLibraryEntity == null)
+ {
+ return new MovieLibraryInfoEntity();
+ }
+ return movieLibraryEntity;
+ }
+
+
+
+ /// <summary>
+ /// 褰辩墖鏀惰棌/鍙栨秷鏀惰棌
+ /// </summary>
+ /// <param name="deviceId">璁惧id</param>
+ /// <param name="rcId">閬ユ帶鍣╥d</param>
+ /// <param name="movieId">褰辩墖id</param>
+ /// <param name="collect">true = 鏀惰棌,false = 鍙栨秷鏀惰棌</param>
+ /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param>
+ public bool IsCollect(string deviceId, string rcId, string movieId, bool collect, TipType tipType = TipType.flicker)
+ {
+
+ JObject jObject = new JObject();
+ jObject.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ jObject.Add("deviceId", deviceId);//璁惧id
+ jObject.Add("rcId", rcId);//閬ユ帶鍣╥d
+ jObject.Add("movieId", movieId);//褰辩墖id
+ jObject.Add("collect", collect);//褰辩墖id
+ //d.Add("zoneType", deviceId);//鍖哄煙
+
+ var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(jObject.ToString(), NewAPI.Api_Post_Aks_MovieLibraryCollect, "褰辩墖鏀惰棌");
+ if (!this.DataChecking(responsePackNew, tipType))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+
+
+ /// <summary>
+ /// 鏀惰棌褰辩墖鍒嗛〉鑾峰彇
+ /// </summary>
+ /// <param name="deviceId">璁惧id</param>
+ /// <param name="rcId">閬ユ帶鍣╥d</param>
+ /// <param name="filterCategorys">杩囨护鏁版嵁</param>
+ /// <param name="pageNo">褰撳墠椤�</param>
+ /// <param name="pageSize">椤垫暟</param>
+ /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param>
+ public List<MovieLibrary> GetcollectPage(string deviceId, string rcId, int pageNo, int pageSize, TipType tipType = TipType.flicker)
+ {
+
+ JObject jObject = new JObject();
+ jObject.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ jObject.Add("deviceId", deviceId);//璁惧id
+ jObject.Add("rcId", rcId);//閬ユ帶鍣╥d
+ jObject.Add("pageNo", pageNo);//褰撳墠椤�
+ jObject.Add("pageSize", pageSize);//椤垫暟
+ //d.Add("zoneType", deviceId);//鍖哄煙
+ var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(jObject.ToString(), NewAPI.Api_Post_Aks_Controlist, "鏀惰棌褰辩墖鍒嗛〉鑾峰彇");
+ if (!this.DataChecking(responsePackNew, tipType))
+ {
+ return new List<MovieLibrary>();
+ }
+ var movieLibraryEntity = Newtonsoft.Json.JsonConvert.DeserializeObject<MovieLibraryEntity>(responsePackNew.Data.ToString());
+ if (movieLibraryEntity == null)
+ {
+ return new List<MovieLibrary>();
+ }
+ return movieLibraryEntity.list;
+ }
+
+
+ /// <summary>
+ /// 褰辩墖鎾斁
+ /// </summary>
+ /// <param name="deviceId">璁惧id</param>
+ /// <param name="rcId">閬ユ帶鍣╥d</param>
+ /// <param name="movieId">褰辩墖id</param>
+ /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param>
+ public bool MovieLibraryPlay(string deviceId, string rcId, string movieId, TipType tipType = TipType.flicker)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("rcId", rcId);//閬ユ帶鍣╥d
+ d.Add("movieId", movieId);//褰辩墖id
+ //d.Add("zoneType", deviceId);//鍖哄煙
+ var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_Aks_MovieLibraryPlay, "褰辩墖鎾斁");
+ if (!this.DataChecking(responsePackNew, tipType))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ #endregion
+
+ /// <summary>
+ ///璇锋眰鏈嶅姟鍣紙涓庝綇瀹呮湁鍏�:渚嬪锛沨omeId锛�
+ /// </summary>
+ /// <param name="o">鍙戦�佹暟鎹�</param>
+ /// <param name="api_Url">璇锋眰鍦板潃(涓嶆槸缁濆鍦板潃)</param>
+ /// <param name="tag">鏍囪->鎻忚堪鎺ュ彛(鑷畾涔�)</param>
+ /// <returns></returns>
+ public ResponsePackNew RequestServerhomeId(object o, string api_Url, string tag, int mTimeout = 3)
+ {
+ Log($"{DateTime.Now}->鍙戦��->{tag}", api_Url, o.ToString());
+ var requestJson = HttpUtil.GetSignRequestJson(o);
+ var r = HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout);
+ Log($"{DateTime.Now}->鍥炲->{tag}", "", Newtonsoft.Json.JsonConvert.SerializeObject(r));
+ return r;
+
+ }
+
+ /// <summary>
+ /// <summary>
+ /// 妫�楠屾暟鎹洖澶嶆垚鍔熸垨鑰呭け璐�
+ /// </summary>
+ /// <param name="responsePackNew">鍥炲鏁版嵁瀵硅薄</param>
+ /// <param name="tipType">鏄惁闇�瑕佹彁绀�</param>
+ /// <returns></returns>
+ private bool DataChecking(ResponsePackNew responsePackNew, TipType tipType)
+ {
+ if (responsePackNew.Data == null || responsePackNew.Code != "0" || responsePackNew.Data.ToString() == "")
+ {
+ if (TipType.flicker == tipType)
+ {
+ if (responsePackNew == null)
+ {
+ responsePackNew = new ResponsePackNew { message = "娌″洖澶�,璇风‘璁ょ綉缁滄槸鍚︽甯�.", Code = "-1", };
+ }
+ Application.RunOnMainThread(() =>
+ {
+ //new Tip()
+ //{
+ // CloseTime = 1,
+ // Text = responsePackNew.message + "(" + responsePackNew.Code + ")",
+ // Direction = AMPopTipDirection.None,
+ //}.Show(MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1));
+ CommonMethod.Current.ShowTip(responsePackNew.message + "(" + responsePackNew.Code + ")");
+ });
+ }
+ return false;
+ }
+ return true;
+ }
+ /// <summary>
+ /// 鎵撳嵃鏃ュ織
+ /// </summary>
+ /// <param name="tag">鎵撳嵃鏍囪</param>
+ /// <param name="content">鎵撳嵃鍐呭</param>
+ public void Log(string tag, string url, string content)
+ {
+#if DEBUG
+ Console.WriteLine(tag + $"\r\n{url}\r\n{content}");
+#endif
+ }
+
+ }
+}
--
Gitblit v1.8.0