From 56dfdc1bf7e7f2bb2456f29c3686dfa935a89e80 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期四, 30 六月 2022 13:59:45 +0800 Subject: [PATCH] 2022年06月30日13:59:08 --- HDL_ON/Common/ApiUtlis.cs | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs index e16185b..22953a6 100644 --- a/HDL_ON/Common/ApiUtlis.cs +++ b/HDL_ON/Common/ApiUtlis.cs @@ -153,17 +153,35 @@ 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($"璇诲彇璁惧淇℃伅鎴愬姛"); + MainPage.Log($"sid鍒楄〃鑾峰彇===="+ deviceResult.Data.ToString()); var deviceList = Newtonsoft.Json.JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString()); if (deviceList == null) { 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