From f86c8b5dcf5c84386745b009fc4115fa9db3b76d Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 05 六月 2020 16:45:44 +0800 Subject: [PATCH] 2020-06-05 1.修复消息报警页面,调用清空消息接口失败问题。 --- SmartHome/SmartHome/UI/SimpleControl/Phone/Warning/WarningList.cs | 15 +++++++++++---- SmartHome/SmartHome/Net/API.cs | 8 ++++++++ SmartHome/SmartHome/HDL/Operation/RemoteInfo.cs | 6 +++--- SmartHome/ON/Properties/AndroidManifest.xml | 2 +- SmartHome/SmartHome/UI/SimpleControl/MainPage.cs | 6 ++++-- 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/SmartHome/ON/Properties/AndroidManifest.xml b/SmartHome/ON/Properties/AndroidManifest.xml index fe7c555..dfc50e0 100644 --- a/SmartHome/ON/Properties/AndroidManifest.xml +++ b/SmartHome/ON/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="2020060201" android:versionName="2.506021" package="com.hdl.in"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="2020060501" android:versionName="2.506051" package="com.hdl.in"> <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="26" /> <!--Ezviz 鏉冮檺 --> <uses-permission android:name="android.permission.FLASHLIGHT" /> diff --git a/SmartHome/SmartHome/HDL/Operation/RemoteInfo.cs b/SmartHome/SmartHome/HDL/Operation/RemoteInfo.cs index ddbd20b..ddad567 100644 --- a/SmartHome/SmartHome/HDL/Operation/RemoteInfo.cs +++ b/SmartHome/SmartHome/HDL/Operation/RemoteInfo.cs @@ -34,9 +34,9 @@ if (revertObj.StateCode == "SUCCESS") { var msgList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RemoteInfoMsg>> (revertObj.ResponseData.ToString ()); - //娓呮瑙掓爣 - new WebClient().DownloadData ($"https://global.hdlcontrol.com/HangZhouHdlCloudApi/ZigbeeUsers/CornerClear"); - // + ////娓呮瑙掓爣 2020-06-05 楂樿儨璇翠簯绔凡鑷姩娓呯┖锛屼笉闇�瑕佽皟鐢� + //new WebClient().DownloadData ($"https://global.hdlcontrol.com/HangZhouHdlCloudApi/ZigbeeUsers/CornerClear"); + if (msgList == null || msgList.Count == 0) return; if (msgList.Count == Current.RemoteInfoList.Count && msgList [msgList.Count - 1].MsgTime == Current.RemoteInfoList [Current.RemoteInfoList.Count - 1].MsgTime) diff --git a/SmartHome/SmartHome/Net/API.cs b/SmartHome/SmartHome/Net/API.cs index 57e73b1..56110d6 100644 --- a/SmartHome/SmartHome/Net/API.cs +++ b/SmartHome/SmartHome/Net/API.cs @@ -220,5 +220,13 @@ } + /// <summary> + /// 鎺ㄩ�乀okenID + /// </summary> + public class RegIDObj + { + public string RegID; + } + #endregion } \ No newline at end of file diff --git a/SmartHome/SmartHome/UI/SimpleControl/MainPage.cs b/SmartHome/SmartHome/UI/SimpleControl/MainPage.cs index f76c0e7..1307ee2 100644 --- a/SmartHome/SmartHome/UI/SimpleControl/MainPage.cs +++ b/SmartHome/SmartHome/UI/SimpleControl/MainPage.cs @@ -48,9 +48,9 @@ public static string sendTime = ""; public static string recTime = ""; #if wallon - public static string CodeIDString = "202006021"; + public static string CodeIDString = "202006051"; #else - public static string CodeIDString = "2.506021"; + public static string CodeIDString = "2.506051"; #endif public static UserInfo LoginUser; public static string RequestSource = "1"; //0:Zigbee銆�1:HdlOn銆�2:GraphicsMonitor銆�3:BusproSoft銆�4:AgentWeb @@ -318,6 +318,8 @@ public static bool checeInternet () { + return true; + byte [] bytes = null; var dateTime = DateTime.Now; System.Threading.Tasks.Task.Run (() => { diff --git a/SmartHome/SmartHome/UI/SimpleControl/Phone/Warning/WarningList.cs b/SmartHome/SmartHome/UI/SimpleControl/Phone/Warning/WarningList.cs index e92b4a3..bf07ee3 100644 --- a/SmartHome/SmartHome/UI/SimpleControl/Phone/Warning/WarningList.cs +++ b/SmartHome/SmartHome/UI/SimpleControl/Phone/Warning/WarningList.cs @@ -152,10 +152,17 @@ alert.ResultEventHandler += (sender1, e1) => { if (e1) { System.Threading.Tasks.Task.Factory.StartNew (() => { - string jsonString = "{" + - "\"RegID\":" + "\"" + UserConfig.Instance.tokenID + "\"" + "," + - "}"; - var revertObj = MainPage.RequestHttps ($"https://global.hdlcontrol.com/HangZhouHdlCloudApi/ZigbeeUsers/ClearMessage", jsonString, true); + //string jsonString = "{" + + // "\"RegID\":" + "\"" + UserConfig.Instance.tokenID + "\"" + "," + + // "}"; + //var revertObj = MainPage.RequestHttps ($"https://global.hdlcontrol.com/HangZhouHdlCloudApi/ZigbeeUsers/ClearMessage", jsonString, true); + + //2020-06-05 淇娑堟伅鎶ヨ椤甸潰锛岃皟鐢ㄦ竻绌烘秷鎭帴鍙eけ璐ラ棶棰樸�� + var mRegIDObj = new RegIDObj () { + RegID = UserConfig.Instance.tokenID, + }; + var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject (mRegIDObj); + var revertObj = MainPage.RequestHttps (@"ClearMessage", jsonString, true, false); }); RemoteInfo.Current.CleanAll (); ShowWarningListPage (); -- Gitblit v1.8.0