From cb1476f1197b8730038b4ef485f8f036e1d93422 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 09 六月 2021 16:49:32 +0800
Subject: [PATCH] 合并文本缺漏
---
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs | 36 +++++++++++++++++++-----------------
1 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
index 1e1bb3c..ced74cc 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
@@ -33,7 +33,7 @@
{
get
{
- return Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID;
+ return Entity.DB_ResidenceData.Instance.CurrentRegion.id;
}
}
/// <summary>
@@ -43,7 +43,7 @@
{
get
{
- return Entity.DB_ResidenceData.Instance.CurrentRegion.IsOthreShare;
+ return Entity.DB_ResidenceData.Instance.CurrentRegion.isOtherShare;
}
}
/// <summary>
@@ -79,9 +79,9 @@
/// <summary>
/// 鑾峰彇閬ユ帶鍣ㄥ垪琛�
/// </summary>
- public static ResponsePackNew ControlList(Pir pir)
+ public static ResponsePackNew ControlList(string deviceId)
{
- var jObject = new JObject { { "homeId", HomeId }, { "deviceId", pir.deviceId } };
+ var jObject = new JObject { { "homeId", HomeId }, { "deviceId", deviceId} };
var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Ir_List);
return responsePackNew;
}
@@ -150,15 +150,8 @@
/// 绾㈠鐮佸涔�
/// </summary>
/// <returns></returns>
- public static void CodeStudy(Control control,AttributesStatus buttonObj,Action<ResponsePackNew> action)
+ public static void CodeStudy(Control control, AttributesStatus buttonObj, Action<Cloud> action)
{
- //var whichDayJson = jay["whichDay"].ToString();
- //var whichDayAry = Newtonsoft.Json.Linq.JArray.Parse(whichDayJson);
- //for (int b = 0; b < whichDayAry.Count; b++)
- //{
- // var days = whichDayAry[b].ToString();
- // timer.whichDay.Add(int.Parse(days));
- //}
var job = new JObject { };
job.Add("key", buttonObj.key);
job.Add("data_type", "string");
@@ -168,21 +161,32 @@
var jArray = new JArray { };
jArray.Add(job);
var jObject = new JObject { { "homeId", HomeId }, { "deviceId", control.deviceId }, { "attributes", jArray } };
- ResponsePackNew responsePackNew = null;
+ Cloud cloud = null;
new System.Threading.Thread(() =>
{
try
{
//鍙戦�佺孩澶栫爜瀛︿範鍛戒护
- responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Ir_CodeStudy);
+ var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Ir_CodeStudy);
+ if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
+ {
+ PirMethod method = new PirMethod();
+ PirMethod.buttondata = "";
+ cloud = method.MqttDate("鎸夐敭", control.sid, 25);
+ }
+ else
+ {
+ PirMethod method = new PirMethod();
+ method.ErrorShow(responsePackNew, "");
+ }
}
catch { }
finally
{
Application.RunOnMainThread(() =>
{
- action(responsePackNew);
+ action(cloud);
});
}
@@ -207,7 +211,6 @@
var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Ir_CodeRemove);
return responsePackNew;
}
-
/// <summary>
/// 绾㈠瀹�/閬ユ帶鍣ㄥ垹闄�
/// </summary>
@@ -275,7 +278,6 @@
{ IsBackground = true }.Start();
}
-
/// <summary>
///璇锋眰鏈嶅姟鍣紙涓庝綇瀹呮湁鍏�:渚嬪锛沨omeId锛�
/// </summary>
--
Gitblit v1.8.0