From 806006a2180e83cf9053bd8292ccf8ec8c60a145 Mon Sep 17 00:00:00 2001 From: haotian <2421912570@qq.com> Date: Mon, 28 Jul 2025 10:43:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=85=B3=E9=97=AD=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module_admin/controller/login_controller.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ruoyi-fastapi-backend/module_admin/controller/login_controller.py b/ruoyi-fastapi-backend/module_admin/controller/login_controller.py index 8a1fa8c..781d94e 100644 --- a/ruoyi-fastapi-backend/module_admin/controller/login_controller.py +++ b/ruoyi-fastapi-backend/module_admin/controller/login_controller.py @@ -26,12 +26,15 @@ async def login( request: Request, form_data: CustomOAuth2PasswordRequestForm = Depends(), query_db: AsyncSession = Depends(get_db) ): # 是否启用验证码 - captcha_enabled = ( - True - if await request.app.state.redis.get(f'{RedisInitKeyConfig.SYS_CONFIG.key}:sys.account.captchaEnabled') - == 'true' - else False - ) + # captcha_enabled = ( + # True + # if await request.app.state.redis.get(f'{RedisInitKeyConfig.SYS_CONFIG.key}:sys.account.captchaEnabled') + # == 'true' + # else False + # ) + + captcha_enabled =False + user = UserLogin( userName=form_data.username, password=form_data.password,