public JsonResult SendValidCode(string mobileNo) { SmsValidateProvider registerFacade = new SmsValidateProvider(mobileNo, Entities.SmsValidateType.注册); if (!registerFacade.SendCode()) { return(FailResult(registerFacade.PromptInfo.CustomMessage)); } return(SuccessResult()); }
public ActionResult SendValidCode() { SmsValidateProvider smsProvider = new SmsValidateProvider(Package.UserCode, Entities.SmsValidateType.注册); if (!smsProvider.SendCode()) { return(FailResult(smsProvider.PromptInfo.CustomMessage, (int)smsProvider.PromptInfo.ResultType)); } return(SuccessResult()); }
public JsonResult SendValidCode(int PwdType) { Log.Info("UserCode={0}&PWDTYPE={1}", Package.UserCode, PwdType); FuncResult result = new FuncResult(); SmsValidateProvider valid = new SmsValidateProvider(Package.UserCode, (SmsValidateType)PwdType); result.Success = valid.SendCode(); result.Message = result.Success ? null : valid.PromptInfo.CustomMessage; result.StatusCode = result.Success ? 1 : (int)valid.PromptInfo.ResultType; return(Json(result)); }
public ResponseResult Send(SmsSendRequestDTO request) { Log.Info("UserCode={0}&PWDTYPE={1}", request.MobileNo, request.SmsType); SmsValidateProvider valid = new SmsValidateProvider(request.MobileNo, (SmsValidateType)request.SmsType); if (!valid.SendCode()) { return(Fail(valid.PromptInfo.CustomMessage)); } return(Success()); }
public ActionResult SendValidateCode() { //发送绑定手机验证码 SmsValidateProvider smsProvider = new SmsValidateProvider(Package.UserCode, SmsValidateType.绑定手机号); if (!smsProvider.SendCode()) { return(FailResult(smsProvider.PromptInfo.CustomMessage)); } var data = new { Exist = smsProvider.User != null }; return(SuccessResult(data)); }
public override Task <SmsSendResponseDTO> Send(SmsSendRequestDTO request, ServerCallContext context) { return(Task.Run(() => { SmsSendResponseDTO response = new SmsSendResponseDTO(); Log.Info("UserCode={0}&PWDTYPE={1}", request.MobileNo, request.SmsType); SmsValidateProvider valid = new SmsValidateProvider(request.MobileNo, (SmsValidateType)request.SmsType); if (!valid.SendCode()) { response.RetCode = "0500"; response.RetMsg = valid.PromptInfo.CustomMessage; return response; } response.RetCode = "0000"; response.RetMsg = "ok"; return response; })); }