diff --git a/MoviconHub.App/App.config b/MoviconHub.App/App.config
index 6765931..364d977 100644
--- a/MoviconHub.App/App.config
+++ b/MoviconHub.App/App.config
@@ -7,6 +7,8 @@
+
+
diff --git a/MoviconHub.App/Services/ApiHelper.cs b/MoviconHub.App/Services/ApiHelper.cs
index 5dfdf1c..b6da06d 100644
--- a/MoviconHub.App/Services/ApiHelper.cs
+++ b/MoviconHub.App/Services/ApiHelper.cs
@@ -1,6 +1,7 @@
using MoviconHub.App.Com;
using MoviconHub.App.Models;
using System;
+using System.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -20,7 +21,11 @@ namespace MoviconHub.App.Services
{
//_apiConfig = ApiConfig.LoadConfig();
//string baseUrl = $"http://{_apiConfig.ServerAddress}:{_apiConfig.ServerPort}/";
- string baseUrl = $"http://172.16.3.203:8000";
+ string baseUrl = ConfigurationManager.AppSettings["ApiBaseUrl"];
+ if (string.IsNullOrWhiteSpace(baseUrl))
+ {
+ baseUrl = "http://172.16.3.203:8000";
+ }
_apiService = new ApiService(baseUrl);
}
diff --git a/MoviconHub.App/Services/ApiService.cs b/MoviconHub.App/Services/ApiService.cs
index 6c593d4..aab6b38 100644
--- a/MoviconHub.App/Services/ApiService.cs
+++ b/MoviconHub.App/Services/ApiService.cs
@@ -3,6 +3,7 @@ using Newtonsoft.Json;
using NLog;
using RestSharp;
using System;
+using System.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -49,7 +50,13 @@ namespace MoviconHub.App.Services
{
try
{
- var request = new RestRequest("/mes/order/iotPartInfo/getPartInfo", Method.Get);
+ string resource = ConfigurationManager.AppSettings["ApiGetPartInfoPath"];
+ if (string.IsNullOrWhiteSpace(resource))
+ {
+ resource = "/mes/order/iotPartInfo/getPartInfo";
+ }
+
+ var request = new RestRequest(resource, Method.Get);
request.AddParameter("PartQRCodeId", partQrCodeId);
//request.AddParameter("DeviceCode", deviceCode);