From af2c84bc9eb5afb47cf3b8849bb126387d86d755 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期五, 16 八月 2024 13:59:55 +0800
Subject: [PATCH] 1

---
 Turf/Turf.csproj                 |    4 +++-
 Turf/Web.config                  |    4 ++--
 Turf/Controllers/AiController.cs |    8 ++++----
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/Turf/Controllers/AiController.cs b/Turf/Controllers/AiController.cs
index 242f4b7..814b782 100644
--- a/Turf/Controllers/AiController.cs
+++ b/Turf/Controllers/AiController.cs
@@ -13,9 +13,9 @@
 {
     public class AiController : ApiController
     {
-        private string getSourcePath()
+        private string getDataCache()
         {
-            return ConfigurationManager.AppSettings["geoJsonPath"];
+            return ConfigurationManager.AppSettings["dataCache"];
         }
 
         [HttpPost]
@@ -33,10 +33,10 @@
                 }
 
                 //Thread.Sleep(10000);
-                String target = Path.Combine(args.data_dir, "results");
+                String target = Path.Combine(getDataCache(), args.data_dir, "results");
                 if (!Directory.Exists(target)) Directory.CreateDirectory(target);
 
-                String source = getSourcePath();
+                String source = Path.Combine(getDataCache(), "1722828277901", "results");
                 string[] files = Directory.GetFiles(source, "*.geojson");
                 foreach (string file in files)
                 {
diff --git a/Turf/Turf.csproj b/Turf/Turf.csproj
index cfd5ac2..807e028 100644
--- a/Turf/Turf.csproj
+++ b/Turf/Turf.csproj
@@ -104,7 +104,9 @@
     <Content Include="Global.asax" />
     <Content Include="index.html" />
     <Content Include="js\turf.min.6.5.js" />
-    <Content Include="Web.config" />
+    <Content Include="Web.config">
+      <SubType>Designer</SubType>
+    </Content>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="App_Start\WebApiConfig.cs" />
diff --git a/Turf/Web.config b/Turf/Web.config
index 39c9a99..6d659cd 100644
--- a/Turf/Web.config
+++ b/Turf/Web.config
@@ -9,8 +9,8 @@
         <add key="webpages:Enabled" value="false" />
         <add key="ClientValidationEnabled" value="true" />
         <add key="UnobtrusiveJavaScriptEnabled" value="true" />
-        <!-- geojson鐩綍 -->
-      <add key="geoJsonPath" value="D:\AI\datacache\1722828277901\results"/>
+        <!-- 缂撳瓨鐩綍 -->
+      <add key="dataCache" value="D:\AI\datacache"/>
     </appSettings>
     <system.web>
         <compilation debug="true" targetFramework="4.5.2" />

--
Gitblit v1.9.3