コード例 #1
0
        public ResultObject <OutSMS> SmsVerifyCode(string mobilePhone, string Code)
        {
            ResultObject <OutSMS> result = new ResultObject <OutSMS>();

            try
            {
                result.Entity = _smsSrv.SubmitUserVerifyCode(mobilePhone, Code);
            }
            catch (Exception ex)
            {
                result.ErrorMsg = "系统错误。请联系客服!";
                NLogHelper.ErrorTxt($"验证校验码[SmsVerifyCode]:{ex.Message}");
            }
            return(result);
        }
コード例 #2
0
        public IActionResult OnPostSubmitVerifyCode(string mobilePhone, string Code, string BabyName)
        {
            ResultObject <OutSMS> result = new ResultObject <OutSMS>();

            try
            {
                result.Entity = _smsSrv.SubmitUserVerifyCode(mobilePhone, Code);
                if (result.Entity.SMSVerifyStatus == SMSVerifyStatus.Success)
                {
                    var us = GetUserSession(false);
                    DoUpdateUserSimpleInfo(us.OpenId, mobilePhone, BabyName);
                }
            }
            catch (Exception ex)
            {
                result.ErrorMsg = "系统错误。请联系客服!";
                NLogHelper.ErrorTxt($"验证校验码[OnPostSubmitVerifyCode]:{ex.Message}");
            }
            return(new JsonResult(result));
        }