From 3de4f9b520d8176ecb0610a1d70e93048bc7439a Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Wed, 10 Jul 2024 13:53:24 +0800 Subject: [PATCH] =?UTF-8?q?api=E6=8E=A5=E5=8F=A3=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/Tnb.Systems/System/DataInterfaceService.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/system/Tnb.Systems/System/DataInterfaceService.cs b/system/Tnb.Systems/System/DataInterfaceService.cs index cb048ea6..4b650ea7 100644 --- a/system/Tnb.Systems/System/DataInterfaceService.cs +++ b/system/Tnb.Systems/System/DataInterfaceService.cs @@ -1099,13 +1099,18 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController try { + string tempPath = entity.Path; + if (!string.IsNullOrEmpty(tempPath) && !tempPath.StartsWith("http")) + { + tempPath = $"{App.HttpContext.Request.Scheme}://{App.HttpContext.Request.Host}{tempPath}"; + } switch (entity.RequestMethod) { case "6": - result = (await entity.Path.SetHeaders(dicHerader).SetQueries(dic).GetAsStringAsync()).ToObject(); + result = (await tempPath.SetHeaders(dicHerader).SetQueries(dic).GetAsStringAsync()).ToObject(); break; case "7": - result = (await entity.Path.SetHeaders(dicHerader).SetBody(dic).PostAsStringAsync()).ToObject(); + result = (await tempPath.SetHeaders(dicHerader).SetBody(dic).PostAsStringAsync()).ToObject(); break; } }