Ejemplo n.º 1
0
        public ActionResult Login()
        {
            ReturnObject ro       = new ReturnObject();
            string       UserName = this.Request.Form["UserName"];
            string       Password = this.Request.Form["Password"];

            User user = LoginUtils.ValidateUser(UserName, Password);

            if (user == null)
            {
                ro.ErrorMessage = "用户名或密码错误!";
            }
            else
            {
                UserUtils.SetUser(user);
                ro.AddData("Link", "BroadcastAdmin");
            }
            return(Content(Newtonsoft.Json.JsonConvert.SerializeObject(ro)));
        }