//添加评论 public ActionResult AddComment(int aid, int id, string content) { if (Request.Cookies["Login"] == null) { return(Content("login")); } else { HttpCookie cookie = Request.Cookies["Login"]; JObject name = readtoken(cookie.Values["Token"]); EComment etc = new EComment { UserName = name["UserName"].ToString(), Animationid = aid, Evaluationid = id, Time = DateTime.Now, Likenum = 0, content = content }; bool add = eManager.AddComment(etc); if (add) { var comm = eManager.GetEComments(id); return(PartialView("EComment", comm)); } else { return(Content("fail")); } } }