IP和路径增加了可配置

This commit is contained in:
2026-04-15 17:32:39 +08:00
parent 4b89afed5b
commit 9f2d380897
3 changed files with 16 additions and 2 deletions

View File

@@ -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);