From 3055ac3c5a7a18db21f2adc6a36f68ae0fd708c2 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 06 五月 2022 14:48:58 +0800
Subject: [PATCH] 定制
---
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