From 7594ae86e48a0ee1adf40aacc3595aa87bef9877 Mon Sep 17 00:00:00 2001 From: fyf Date: Tue, 24 May 2022 15:23:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BPASmartClient.ViewModel/LogOrAlarmIOTViewModel.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BPASmartClient.ViewModel/LogOrAlarmIOTViewModel.cs b/BPASmartClient.ViewModel/LogOrAlarmIOTViewModel.cs index 032b9249..9d059bd4 100644 --- a/BPASmartClient.ViewModel/LogOrAlarmIOTViewModel.cs +++ b/BPASmartClient.ViewModel/LogOrAlarmIOTViewModel.cs @@ -28,7 +28,7 @@ namespace BPASmartClient.ViewModel #endregion #region 变量 public string api = "https://bpa.black-pa.com:21527/datav/api/Log/QueryLogFile?DeviceName="; - + public string DataVApiAddress { set; get; } private ObservableCollection _LogModels; public ObservableCollection LogDataFile { get @@ -51,6 +51,8 @@ namespace BPASmartClient.ViewModel #region 函数 public void Init() { + DataVApiAddress = System.Configuration.ConfigurationManager.AppSettings["DataVServiceUri"].ToString(); + LogDataFile = new ObservableCollection(); //查询 QueryCommand = new RelayCommand(() => @@ -66,7 +68,7 @@ namespace BPASmartClient.ViewModel try { LogDataFile.Clear(); - api = $"https://bpa.black-pa.com:21527/datav/api/Log/QueryLogFile?DeviceName={DataVClient.GetInstance().DeviceDataV.deviceTable.devicename}"; ; + api = $"{DataVApiAddress}/api/Log/QueryLogFile?DeviceName={DataVClient.GetInstance().DeviceDataV.deviceTable.devicename}"; ; string json = HttpRequestHelper.HttpGetRequest(api, 1000); JsonMsg> jsonMsg = Tools.JsonToObjectTools>>(json); jsonMsg.obj?.data?.ForEach(file =>