From bc5a451a66b2254490b20cfd775cc3356a79aaee Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Fri, 25 Aug 2023 11:51:23 +0800 Subject: [PATCH 1/2] up --- .../host/SettleAccount.HttpApi.Host/Startup.cs | 11 +++++++++++ .../SettleAccount.HttpApi.Host/wwwroot/api/site.js | 2 +- .../wwwroot/components/form/form-input.js | 4 ++-- .../wwwroot/config/settings.js | 4 ++-- .../wwwroot/request/index.js | 8 ++++---- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs index d717a9c7..5ac1d194 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs @@ -29,6 +29,16 @@ public class Startup options.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(new[] { "image/svg+xml" }); }); services.AddScheduler(); + services.AddCors(options => + { + options.AddPolicy("Default", builder => + { + builder.SetIsOriginAllowed(isOriginAllowed => true) + .AllowAnyMethod() + .AllowAnyHeader() + .AllowCredentials(); + }); + }); services.AddSingleton(); services.AddSingleton(); services.AddSignalR(o => o.EnableDetailedErrors = true); @@ -53,6 +63,7 @@ public class Startup public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) { + app.UseCors("Default"); app.UseResponseCompression(); app.UseRouting(); app.UseEndpoints(endpoints => endpoints.MapHub("/api/hub")); diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/api/site.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/api/site.js index 9e01ac51..aa6f46fc 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/api/site.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/api/site.js @@ -147,7 +147,7 @@ async function getLocalizationAsync() { userAgent: "用户代理", ["Invalid username or password!"]: "用户名或密码错误", ["The user account has been locked out due to invalid login attempts. Please wait a while and try again."]: "用户已锁定,请稍后重试", - ["Volo.Abp.Identity:PasswordMismatch"]: "密码错误", + ["Incorrect password."]: "密码错误", }, en: { application: "WTA Framework", diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js index cb0aec0e..b4400236 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js @@ -26,12 +26,12 @@ export default {