From 44538302375e489af520e320de908d8cfcf43691 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 21 二月 2022 13:49:32 +0800 Subject: [PATCH] HomeKit对接说明 --- HDL_ON/Common/ApiUtlis.cs | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs index e16185b..75c9bf3 100644 --- a/HDL_ON/Common/ApiUtlis.cs +++ b/HDL_ON/Common/ApiUtlis.cs @@ -153,10 +153,10 @@ MainPage.Log($"璇诲彇鎴块棿鏁版嵁澶辫触:Code:{roomResult.Code}; msg:{roomResult.message}"); } //===================璁惧======================= - var deviceResult = Ins.HttpRequest.GetDeviceList(); + var deviceResult = Ins.HttpRequest.GetDeviceList("30","1"); if (deviceResult.Code == StateCode.SUCCESS) { - endTime = DateTime.Now.AddSeconds(100); + endTime = DateTime.Now.AddSeconds(5); MainPage.Log($"璇诲彇璁惧淇℃伅鎴愬姛"); var deviceList = Newtonsoft.Json.JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString()); @@ -164,6 +164,23 @@ { deviceList = new DevcieApiPack(); } + try + { + while (deviceList.totalPage != deviceList.pageNo) + { + var deviceResult2 = Ins.HttpRequest.GetDeviceList("30", Convert.ToInt32(deviceList.pageNo) + 1 + ""); + if (deviceResult2.Code == StateCode.SUCCESS) + { + var deviceList2 = Newtonsoft.Json.JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString()); + deviceList.pageNo = deviceList2.pageNo; + deviceList.list.AddRange(deviceList2.list); + } + } + }catch(Exception ex) + { + + } + string delFile = ""; if (FunctionList.List.GetDeviceFunctionList().Count > 0) { -- Gitblit v1.8.0