From 69d4497f005b2205c057ff8c13bd1dd17ec3c0e5 Mon Sep 17 00:00:00 2001 From: ckping0987 <253180123@qq.com> Date: Fri, 8 Dec 2023 15:08:44 +0000 Subject: [PATCH] =?UTF-8?q?update=20ZR.Admin.WebApi/Controllers/System/Sys?= =?UTF-8?q?LoginController.cs.=20=E4=BF=AE=E5=A4=8D=20=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E5=90=8E=EF=BC=8C=E4=BE=9D=E7=84=B6?= =?UTF-8?q?=E4=BC=9A=E7=94=9F=E6=88=90=E9=AA=8C=E8=AF=81=E7=A0=81BUG?= =?UTF-8?q?=EF=BC=88ps=EF=BC=9A=E5=BE=AE=E8=BD=AF=E8=87=AA=E5=B8=A6?= =?UTF-8?q?=E7=9A=84dotnet=20core=E9=95=9C=E5=83=8F=20=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=94=9F=E6=88=90=E9=AA=8C=E8=AF=81=E7=A0=81=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ckping0987 <253180123@qq.com> --- ZR.Admin.WebApi/Controllers/System/SysLoginController.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs b/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs index e6d88804..f5a0fa04 100644 --- a/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs +++ b/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs @@ -1,4 +1,4 @@ -using Lazy.Captcha.Core; +using Lazy.Captcha.Core; using Microsoft.AspNetCore.Mvc; using ZR.Admin.WebApi.Filters; using ZR.Infrastructure.Helper; @@ -141,9 +141,9 @@ namespace ZR.Admin.WebApi.Controllers.System SysConfig sysConfig = sysConfigService.GetSysConfigByKey("sys.account.captchaOnOff"); var captchaOff = sysConfig?.ConfigValue ?? "0"; - var info = SecurityCodeHelper.Generate(uuid, 60); - var obj = new { captchaOff, uuid, img = info.Base64 };// File(stream, "image/png") - + CaptchaData? info = null; + if(captchaOff == "0") info = SecurityCodeHelper.Generate(uuid, 60); + var obj = new { captchaOff, uuid, img = info?.Base64 };// File(stream, "image/png") return SUCCESS(obj); } -- Gitee