From fba3a6c55c4de790eaeee55f9897d668bb36dbb8 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期四, 13 十月 2022 13:55:21 +0800 Subject: [PATCH] 2022年10月13日13:55:00 --- HDL_ON/Common/ApiUtlis.cs | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs index c2ac822..10b28ef 100644 --- a/HDL_ON/Common/ApiUtlis.cs +++ b/HDL_ON/Common/ApiUtlis.cs @@ -159,6 +159,7 @@ 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) { @@ -432,6 +433,37 @@ } }) { IsBackground = true }.Start(); + + + + + //涓嬭浇鍏変紡鏁版嵁 + new System.Threading.Thread(() => { + try + { + HttpServerRequest http = new HttpServerRequest(); + var packData = http.GetInverterList(); + if (packData != null) + { + if (packData.Code == StateCode.SUCCESS) + { + var inverterList = JsonConvert.DeserializeObject<List<InverterInfo>>(packData.Data.ToString()); + if (inverterList!= null) + { + FunctionList.List.InverterList = inverterList; + } + } + } + } + catch (Exception ex) + { + MainPage.Log($"璇诲彇鍏変紡鏁版嵁寮傚父:{ex.Message}"); + } + + }) { IsBackground = true }.Start(); + + + } /// <summary> @@ -479,6 +511,7 @@ FileUtlis.Files.DeleteFile(file); } } + FunctionList.List.securities.Clear(); foreach (var function in infoList) { function.SaveFile(); -- Gitblit v1.8.0