Exemplo n.º 1
0
 public ActionResult FocusPic(int type)
 {
     try
     {
         var data = FocusPicLogic.GetAppList(type);
         if (data == null || data.Count() == 0)
         {
             data = new List <FocusPicModel>();
             data.Add(new FocusPicModel()
             {
                 PicUrl      = WebConfig.articleDetailsDomain() + "/app/images/default.jpg",
                 CreateTime  = DateTime.Now,
                 Description = "默认图",
                 IsEnable    = 1,
                 Type        = type,
                 Sort        = 1,
                 Title       = "默认图",
                 LinkUrl     = ""
             });
         }
         return(Json(new ResultModel(ApiStatusCode.OK, data)));
     }
     catch (Exception ex)
     {
         LogHelper.Log(string.Format("FocusPic:message:{0},StackTrace:{1}", ex.Message, ex.StackTrace), LogHelperTag.ERROR);
         return(Json(new ResultModel(ApiStatusCode.SERVICEERROR)));
     }
 }
Exemplo n.º 2
0
        public ActionResult FocusPic(int type)
        {
            var data = FocusPicLogic.GetAppList(type);

            return(Json(new ResultModel(ApiStatusCode.OK, data)));
        }