From 7ff74f599084561338eef1230db5aa45f74565f8 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期一, 15 四月 2024 18:03:33 +0800
Subject: [PATCH] 1.ERP订单关闭增加单据id 2.MES工单关闭增加源单id关联
---
VueWebCoreApi/Startup.cs | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/VueWebCoreApi/Startup.cs b/VueWebCoreApi/Startup.cs
index 0248770..a9f68a3 100644
--- a/VueWebCoreApi/Startup.cs
+++ b/VueWebCoreApi/Startup.cs
@@ -76,7 +76,7 @@
Description = $"Panda.Sewerage : {version} ",
});
});
-
+
string basePath = Path.GetDirectoryName(typeof(Program).Assembly.Location);
string xmlPath = Path.Combine(basePath, "VueWebCoreApi.xml");
c.IncludeXmlComments(xmlPath, true);
@@ -98,6 +98,7 @@
services.AddTransient<HttpResultfulJob>();
services.AddSingleton<ISchedulerFactory, StdSchedulerFactory>();
services.AddSingleton<IJobFactory, IOCJobFactory>();
+
//跨域设置
services.AddCors(options =>
@@ -145,7 +146,7 @@
{
c.SwaggerEndpoint($"/swagger/{version}/swagger.json", $"{version}");
});
-
+
});
#endregion
app.UseHttpsRedirection();
@@ -156,12 +157,13 @@
//添加静态文件中间件
app.UseDefaultFiles();
//添加授权文件
- app.UseStaticFiles(new StaticFileOptions()
- {
- ContentTypeProvider = new FileExtensionContentTypeProvider()
- {
- Mappings = { [".xls"] = "application/vnd.ms-excel" }
- }
+ app.UseStaticFiles(new StaticFileOptions() {
+ ContentTypeProvider = new FileExtensionContentTypeProvider() {
+ Mappings = {
+ [".xls"] = "application/vnd.ms-excel",
+ [".apk"] = "application/vnd.android.package-archive"
+ }
+ }
});
app.UseStaticFiles();
//跨域
@@ -188,15 +190,15 @@
// Mappings = { [".exe"] = "application/octect-stream" }
// }
//});
-
+
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapHub<ChatHub>("/ChatHub", options =>
{
- options.Transports =
- HttpTransportType.WebSockets |
- HttpTransportType.LongPolling;
+ options.Transports =
+ HttpTransportType.WebSockets |
+ HttpTransportType.LongPolling;
});
});
loggerFactory.AddLog4Net("Config/log4net.config");
--
Gitblit v1.9.3