public JsonResult DoLogin(String account, String password) { T_UserDAO dao = new T_UserDAO(); T_User user = dao.getByAccount(account); if (user != null && Tool.MD5Encrypt(password, 32).Equals(user.password)) { this.HttpContext.Session.SetString("username", user.name); return(Success("登陆成功", "message")); } return(Fail("用户名密码不匹配", "message")); }