首页 > 代码库 > MVC Json 的返回

MVC Json 的返回

/// <summary>
        /// 获取评论列表
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        public ActionResult GetCommentList(int pageIndex=1)
        { 
            try{
                WebUser webuser= FunSession.GetSession() as WebUser;
                var pageCount=0;
                var list = HotelOrderInfoService.GetHotelCommentList(webuser.Id, pageIndex, out pageCount);
                return new JsonResult
                {
                    Data = http://www.mamicode.com/new { mdata = list, pageIndex = pageIndex, pageCount = pageCount, success = true },>

MVC Json 的返回