From 16d058d2b949468e10f6c548a08f4a0247e98802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=82=A5=E7=BE=8A?= <1048382248@qq.com> Date: Mon, 3 Nov 2025 16:46:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++- VideoAnalysis/Learn.VideoAnalysis.csproj | 4 ++++ VideoAnalysis/Program.cs | 13 ++++++------- VideoAnalysisCore/Common/AppCommon.cs | 1 + 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 6c2149d..703446e 100644 --- a/.gitignore +++ b/.gitignore @@ -364,4 +364,6 @@ FodyWeavers.xsd VideoAnalysis/AICore/_Static/ -VideoAnalysisCore/AICore/_Static/ \ No newline at end of file +VideoAnalysisCore/AICore/_Static/ +VideoAnalysis/WebUI/node_modules/ +VideoAnalysis/WebUI/dist/ diff --git a/VideoAnalysis/Learn.VideoAnalysis.csproj b/VideoAnalysis/Learn.VideoAnalysis.csproj index 4c77aa5..14069d8 100644 --- a/VideoAnalysis/Learn.VideoAnalysis.csproj +++ b/VideoAnalysis/Learn.VideoAnalysis.csproj @@ -55,4 +55,8 @@ + + + + diff --git a/VideoAnalysis/Program.cs b/VideoAnalysis/Program.cs index 35b5d24..0d8b95d 100644 --- a/VideoAnalysis/Program.cs +++ b/VideoAnalysis/Program.cs @@ -126,7 +126,7 @@ namespace Learn.VideoAnalysis _ = app.Services.GetRequiredService(); app.UseSwagger(); - app.UseSwaggerUI(); + app.UseSwaggerUI(); app.UseExceptionHandler("/Error"); //添加wwwroot 静态目录 @@ -137,16 +137,15 @@ namespace Learn.VideoAnalysis FileProvider = new PhysicalFileProvider(AppCommon.TaskCachedFile), RequestPath = "/video", }); + app.UseStaticFiles(new StaticFileOptions + { + FileProvider = new PhysicalFileProvider(AppCommon.WebUIFile), + RequestPath = "/web", + }); app.UseAntiforgery(); - app.MapRazorComponents() - .AddInteractiveServerRenderMode(); - //.AddInteractiveWebAssemblyRenderMode() - //.AddAdditionalAssemblies(typeof(VideoAnalysisRazor._Imports).Assembly); - app.MapControllers(); - //自定义 应用 app.UseCorsExpand(); app.UseSqlSugarExpand(); diff --git a/VideoAnalysisCore/Common/AppCommon.cs b/VideoAnalysisCore/Common/AppCommon.cs index 7a473ce..1739404 100644 --- a/VideoAnalysisCore/Common/AppCommon.cs +++ b/VideoAnalysisCore/Common/AppCommon.cs @@ -64,6 +64,7 @@ namespace VideoAnalysisCore.Common /// 鏂囦欢涓嬭浇璺緞 /// public static string TaskCachedFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TaskCachedFile"); + public static string WebUIFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "WebUIFile"); /// /// 妯″瀷鍦板潃