public async Task <Result> RegisterVerifyPhone(RegisterVerfiyParam model) { var verify = RegexHelper.VerifyPhone(model.Phone); if (!verify.Succeeded) { return(Result.Fail(verify.Message)); } var anyPhone = _userManager.Users.Any(c => c.PhoneNumber == model.Phone); if (anyPhone) { return(Result.Fail("此手机号已被注册")); } var code = CodeGen.GenRandomNumber(); var result = await _smsSender.SendCaptchaAsync(model.Phone, code); if (!result.Success) { return(Result.Fail(result.Message)); } return(Result.Ok()); }