/// <summary> /// 发送提现验证码 /// </summary> /// <param name="userContext"></param> /// <returns></returns> public ResponseModel SendWithdrawingAuthCode(UserContext userContext) { //获取提现用户绑定的手机号码 var result = _accountbookProxyService.GetWithdrawingAccountList(userContext); var withdrawingAccountList = result.Data; if (result.Code != Convert.ToInt32(ResponseErrorcode.C200) || withdrawingAccountList == null) { return(new ResponseModel { Code = (int)ErrorCodeEnum.ErrorGettingWithdrawingAccount, Data = result.Data, Message = result.Message }); } var phone = withdrawingAccountList.First().MobilePhone; var model = _authCodeService.SendAuthCode(CaptchaEnum.Withdrawals, userContext.AccId, CaptchaPhoneEmailEnum.Phone, phone); return(new ResponseModel { Code = model.IsSuccess ? (int)ErrorCodeEnum.Success : (int)ErrorCodeEnum.ErrorSendSmsFailed, Message = model.ErrMessage }); }
/// <summary> /// 发送验证码 /// </summary> /// <returns></returns> public ResponseModel SendVerificationCode(UserContext userContext, int context, CaptchaPhoneEmailEnum typeEnum, string phoneOrEmail) { var result = _authCodeService.SendAuthCode((CaptchaEnum)context, userContext.AccId, typeEnum, phoneOrEmail); return(new ResponseModel { Code = result.IsSuccess ? (int)ErrorCodeEnum.Success : (int)ErrorCodeEnum.Failed, Message = result.ErrMessage }); }