李昊 4 éve
szülő
commit
db9241518c

+ 2 - 2
GxPress/Repository/GxPress.Repository.Implement/UserRepository.cs

@@ -575,8 +575,8 @@ namespace GxPress.Repository.Implement
         /// <returns></returns>
         public async Task<bool> UpdateUserPhoneAsync(UserUpdatePhoneRequest request)
         {
-            var key = $"login:{request.Phone}";
-            var code = await _cache.GetStringAsync(key);
+            var key = $"login:{request.Phone}";   
+            var code = _cache.GetString(key).Replace("\"", "");
             if (string.IsNullOrEmpty(code)) throw new BusinessException("验证码已过期");
             if (!request.Code.Equals(code, StringComparison.OrdinalIgnoreCase)) throw new BusinessException("验证码错误");