Exemplo n.º 1
0
 public ActionResult CheckCode()
 {
     //得到验证码的图片
     byte[] bytes = Model_SYS_USER.GenerateValidateCode();
     ////最后将验证码返回
     return(File(bytes, @"image/jpeg"));
 }
Exemplo n.º 2
0
        public JsonResult LoginIn(string id)
        {
            string ip = Request.ServerVariables["REMOTE_ADDR"].ToString();

            if (Request.Form["username"] == null || Request.Form["password"] == null || Request.Form["checkcode"] == null)
            {
                return(PackagingAjaxmsg(AjaxStatu.err, string.Format(Message.ParGetFail, "登录名|密码|验证码")));
            }
            string username  = Request["username"].ToString();
            string password  = Request["password"].ToString();
            string checkcode = Request["checkcode"].ToString();

            AjaxMsgModel amm = Model_SYS_USER.LoginIn(username, password, checkcode, id);

            Model_SYS_USER.GenerateValidateCode();    //北京后台刷新验证码
            return(PackagingAjaxmsg(amm));
        }