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 @@ - 密码(可选,与验证码至少提供一个) - - - - - 验证码(可选,与密码至少提供一个) + 密码