public JsonResult GetIndexAdvert(string entId) { try { if (string.IsNullOrEmpty(entId)) { entId = BaseConfiguration.EntId; } DAL.ImgInfoDal dal = new DAL.ImgInfoDal(); var model = dal.GetIndexAdvert(entId); if (model != null) { return(Json(new { success = true, list = model })); } else { return(Json(new { success = false, list = model })); } } catch (Exception ex) { LogQueue.Write(LogType.Error, "Home/GetWebConfig", ex.Message.ToString()); return(Json(new { success = false, message = "网站广告图获取失败!" })); } }
public JsonResult GetCategory(int channel_Id, string entId) { if (channel_Id <= 0) { return(Json(new { success = false, message = "参数无效" })); } else { try { if (entId == null || entId == "") { entId = BaseConfiguration.EntId; } DAL.ImgInfoDal CDal = new DAL.ImgInfoDal(); List <Category> Clist = CDal.GetCategory(entId, channel_Id); return(Json(new { success = true, list = Clist })); } catch (Exception ex) { LogQueue.Write(LogType.Error, "Img/GetCategory", ex.Message.ToString()); return(Json(new { success = false, message = "导航/分类加载失败!" })); } } }
public JsonResult GetImgInfo(int num, string imgType, string entId, string singular = "", string source = "PC") { if (imgType == "") { return(Json(new { success = false, message = "参数无效" })); } else { try { if (string.IsNullOrEmpty(entId)) { entId = BaseConfiguration.EntId; } DAL.ImgInfoDal IDal = new DAL.ImgInfoDal(); List <ImgInfo> Imglist = IDal.GetImgInfo(num, imgType, entId, source, singular); return(Json(new { success = true, list = Imglist })); } catch (Exception ex) { LogQueue.Write(LogType.Error, "Img/GetImgInfo", ex.Message.ToString()); return(Json(new { success = false, message = "图片加载失败!" })); } } }
public JsonResult GetWebConfig(string entId, string imgType = "") { try { if (string.IsNullOrEmpty(entId)) { entId = BaseConfiguration.EntId; } DAL.ImgInfoDal dal = new DAL.ImgInfoDal(); var list = dal.GetIndexConfig(entId, imgType); return(Json(new { success = true, list = list })); } catch (Exception ex) { LogQueue.Write(LogType.Error, "Home/GetWebConfig", ex.Message.ToString()); return(Json(new { success = false, message = "网站配置接口获取失败!" })); } }
public JsonResult GetFloorInfo(string userId, string entId) { try { if (string.IsNullOrEmpty(entId)) { entId = BaseConfiguration.EntId; } DAL.ImgInfoDal dal = new DAL.ImgInfoDal(); List <IndexFloor> listF = dal.GetIndexFloor(userId, entId); List <IndexFloor> datalist = dal.GetZQIndexFloor(userId, entId); return(Json(new { success = true, list = listF, data = datalist })); } catch (Exception ex) { LogQueue.Write(LogType.Error, "Img/GetFloorInfo", ex.Message.ToString()); return(Json(new { success = false, message = "首页信息加载失败!" })); } }