From 854d367ff1b2e7f3a6c7e5bcc6fbe9a98b2b5aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Mon, 30 Mar 2026 21:44:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YD_Event.Application/Client/OAuthController.cs | 15 ++------------- YD_Event.Application/YD_Event.Application.xml | 7 +------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/YD_Event.Application/Client/OAuthController.cs b/YD_Event.Application/Client/OAuthController.cs index ff2a0d2..2ece3e7 100644 --- a/YD_Event.Application/Client/OAuthController.cs +++ b/YD_Event.Application/Client/OAuthController.cs @@ -38,9 +38,9 @@ public class OAuthController : IDynamicApiController [AllowAnonymous] public async Task Login([FromBody] MiniProgramLoginInput input) { - if (string.IsNullOrEmpty(input.Password) && string.IsNullOrEmpty(input.VerificationCode)) + if (string.IsNullOrEmpty(input.Password) ) { - throw Oops.Bah("密码和验证码至少提供一个"); + throw Oops.Bah("密码必填"); } var appUser = await _appUserRepository.GetFirstAsync(x => x.Mobile == input.Mobile); @@ -62,17 +62,6 @@ public class OAuthController : IDynamicApiController } } - if (!string.IsNullOrEmpty(input.VerificationCode)) - { - var cacheKey = $"{SmsCodeCachePrefix}{input.Mobile}"; - string cachedCode = null; - if (!_memoryCache.TryGetValue(cacheKey, out cachedCode) || cachedCode != input.VerificationCode) - { - throw Oops.Bah("验证码错误或已过期"); - } - _memoryCache.Remove(cacheKey); - } - (string accessToken, string refreshToken) = GenerateTokens(appUser); var userInfo = new diff --git a/YD_Event.Application/YD_Event.Application.xml b/YD_Event.Application/YD_Event.Application.xml index c437991..4f636ee 100644 --- a/YD_Event.Application/YD_Event.Application.xml +++ b/YD_Event.Application/YD_Event.Application.xml @@ -2092,12 +2092,7 @@ - 密码(可选,与验证码至少提供一个) - - - - - 验证码(可选,与密码至少提供一个) + 密码