1111
来源:互联网 发布:linux 小红帽下载 编辑:程序博客网 时间:2024/05/19 23:24
//public ActionResult SendCheckCode(string tel)
//{
// #region 验证参数
// if (!tel.Match(@"^1[3458]\d{9}$"))
// {
// return Content(JsonConvert.SerializeObject(new
// {
// return_code = 1,
// msg = "手机号错误"
// }));
// }
// #endregion
// var ccode = "";
// //生成验证码
// //验证手机号是否有可用验证码
// var sccode = SysDal.F_Sys_GetCheckCode(tel);
// //如果有验证码对应该手机
// if (sccode != null)
// {
// //判断上次获取的时间是否在1分钟以外
// if (sccode.LastTime < DateTime.Now.AddMinutes(-1))
// {
// //在此判断现在的时间是否超出了该验证码的有效期
// if (sccode.Expires > DateTime.Now)
// {
// //若没有,则更新该用户最后获取验证码的时间
// SysDal.F_Sys_UpdateCheckCode(sccode.Id);
// //将值赋给ccode
// ccode = sccode.CheckCode;
// //通过result传值至前台
// return Content(JsonConvert.SerializeObject(new
// {
// return_code = 0,
// result = ccode
// }));
// }
// //若现在的时间超出了该验证码的有效期
// //重新随机生成一个验证码
// ccode = CodeGenerator.GenerateCheckCode();
// //将相关的信息保存至数据库中
// SysDal.F_Sys_AddCheckCode(tel, ccode, DateTime.Now.AddHours(1));
// //将重新生成的验证码信息返回至前台
// return Content(JsonConvert.SerializeObject(new
// {
// return_code = 0,
// result = ccode
// }));
// }
// //提示用户操作太频繁
// return Content(JsonConvert.SerializeObject(new
// {
// return_code = 2,
// result = sccode.CheckCode,
// msg = "验证码获取过于频繁"
// }));
// }
// //若该用户没有相关的验证码信息,则重新生成一条验证码并返回
// ccode = CodeGenerator.GenerateCheckCode();
// SysDal.F_Sys_AddCheckCode(tel, ccode, DateTime.Now.AddHours(1));
// //SysDal.F_Sys_AddCheckCode(tel, ccode, DateTime.Now.AddSeconds(30));
// return Content(JsonConvert.SerializeObject(new
// {
// return_code = 0,
// result = ccode
// }));
//}
//{
// #region 验证参数
// if (!tel.Match(@"^1[3458]\d{9}$"))
// {
// return Content(JsonConvert.SerializeObject(new
// {
// return_code = 1,
// msg = "手机号错误"
// }));
// }
// #endregion
// var ccode = "";
// //生成验证码
// //验证手机号是否有可用验证码
// var sccode = SysDal.F_Sys_GetCheckCode(tel);
// //如果有验证码对应该手机
// if (sccode != null)
// {
// //判断上次获取的时间是否在1分钟以外
// if (sccode.LastTime < DateTime.Now.AddMinutes(-1))
// {
// //在此判断现在的时间是否超出了该验证码的有效期
// if (sccode.Expires > DateTime.Now)
// {
// //若没有,则更新该用户最后获取验证码的时间
// SysDal.F_Sys_UpdateCheckCode(sccode.Id);
// //将值赋给ccode
// ccode = sccode.CheckCode;
// //通过result传值至前台
// return Content(JsonConvert.SerializeObject(new
// {
// return_code = 0,
// result = ccode
// }));
// }
// //若现在的时间超出了该验证码的有效期
// //重新随机生成一个验证码
// ccode = CodeGenerator.GenerateCheckCode();
// //将相关的信息保存至数据库中
// SysDal.F_Sys_AddCheckCode(tel, ccode, DateTime.Now.AddHours(1));
// //将重新生成的验证码信息返回至前台
// return Content(JsonConvert.SerializeObject(new
// {
// return_code = 0,
// result = ccode
// }));
// }
// //提示用户操作太频繁
// return Content(JsonConvert.SerializeObject(new
// {
// return_code = 2,
// result = sccode.CheckCode,
// msg = "验证码获取过于频繁"
// }));
// }
// //若该用户没有相关的验证码信息,则重新生成一条验证码并返回
// ccode = CodeGenerator.GenerateCheckCode();
// SysDal.F_Sys_AddCheckCode(tel, ccode, DateTime.Now.AddHours(1));
// //SysDal.F_Sys_AddCheckCode(tel, ccode, DateTime.Now.AddSeconds(30));
// return Content(JsonConvert.SerializeObject(new
// {
// return_code = 0,
// result = ccode
// }));
//}
0 0
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- 1111
- Oracle SEQUENCE 详细说明
- Linux重定向的说明
- 高速PCB设计知识
- classpath的设置
- 修改mysql默认字符集的方法
- 1111
- 第112天
- 稳
- 为LinuxMint XFCE增加一键共享
- Cadence Allegro15.5操作知识积累
- Struts2初认识,入门小练习
- Oracle与SQL Server的比较
- Ubuntu 14.04英文系统中Chrome浏览器标题栏中文乱码
- How Tomcat workd 之第十章 Installing the Authentictor Value 安装校验值