Q:【手机号不存在】,请先注册或填写
1、短信获取时候报如上错误
2、/bs/api/v3/dev/sms/verify/login/手机号
A:登录时候改成如果手机号不存在直接注册然后登录
E:\0_RG\Code\RG6.PF\rg3-pf\RG3.BS.Dev\Services\SmsService.cs
[HttpGet("verify/{moduleKey}/{phoneNumber}")]
public async Task<SmsResult> VerifySmsAsync(string moduleKey, string verifySmsGuid, string phoneNumber)
{
ResultDetail<string> result = await _des.VerifyGuidAsync(null, null, verifySmsGuid);
if (!result.Success)
{
return new SmsResult { Success = false, Error = result.Error };
}
return _smsService.SendVerifySms(null, null, moduleKey, verifySmsGuid, new List<string> { phoneNumber }, HttpContextUtil.GetClientUserIp(this.HttpContext, true));
}
if (mapperId != null)
{
bool exists = _db.ExecuteScalar<int>(pfParams, mapperId, new { Phones = phoneNumbers }) > 0;
if (moudleKey.Contains("forget") && !exists)
{
throw new BizException(ErrorCodeConst.SMS_56000.ErrorCode, $"【手机号不存在】,请先注册或填写");
}
else if (moudleKey.Contains("login"))
{
}
else if (exists)
{
//手机号注册
throw new BizException(ErrorCodeConst.SMS_56000.ErrorCode, $"【手机号已存在】,可以直接使用或找回密码。");
}
}
文档更新时间: 2023-06-12 09:46 作者:admin