public ActionResult EditPageDelKitActionResult(string pagecode, string kitId) { user_account userAccount = new user_account(); apppagebase appPageBase = new apppagebase(); appbase appBase = new appbase(); JsonResult jsonResult = new JsonResult(); jsonResult.JsonRequestBehavior = JsonRequestBehavior.AllowGet; pagecode = DESEncrypt.Decrypt(pagecode); if (pagecode == null) { Msg.Result = 0; Msg.Msg = "错误编码"; } else { appPageBase = new Psd.H5Show.BLL.apppagebase().GetModel(int.Parse(pagecode)); appBase = new Psd.H5Show.BLL.appbase().GetModel(appPageBase.AppId); if (Request.Cookies["PsdH5ShowUserCode"] == null) { Msg.Result = 0; Msg.Msg = "哎哟,你还未登录呢"; } else { userAccount = Psd.H5Show.BLL.AppTools.GetUserCodeToUseraccountModel( Request.Cookies["PsdH5ShowUserCode"].Value.ToString()); if (!userAccount.ID.Equals(appBase.Uid)) { Msg.Result = 0; Msg.Msg = "无权限编辑此页面"; } else { if (new Psd.H5Show.BLL.apppageinfo().Delete(int.Parse(kitId))) { Msg.Result = 1; Msg.Msg = "删除成功"; } else { Msg.Result = 0; Msg.Msg = "删除失败"; } } } jsonResult.Data = Msg; } return(jsonResult); }
public ActionResult GetAppPageKit(string pagecode, string appcode) { JsonResult json = new JsonResult(); json.JsonRequestBehavior = JsonRequestBehavior.AllowGet; List <apppageinfo> AppPageKitList = new List <apppageinfo>(); user_account userAccount = new user_account(); apppagebase appPageBase = new apppagebase(); appbase appBase = new appbase(); JsonResult jsonResult = new JsonResult(); jsonResult.JsonRequestBehavior = JsonRequestBehavior.AllowGet; pagecode = DESEncrypt.Decrypt(pagecode); if (pagecode == null) { Msg.Result = 0; Msg.Msg = "错误编码"; } else { appPageBase = new Psd.H5Show.BLL.apppagebase().GetModel(int.Parse(pagecode)); appBase = new Psd.H5Show.BLL.appbase().GetModel(appPageBase.AppId); if (Request.Cookies["PsdH5ShowUserCode"] == null) { Msg.Result = 0; Msg.Msg = "哎哟,你还未登录呢"; } else { userAccount = Psd.H5Show.BLL.AppTools.GetUserCodeToUseraccountModel( Request.Cookies["PsdH5ShowUserCode"].Value.ToString()); if (!userAccount.ID.Equals(appBase.Uid)) { Msg.Result = 0; Msg.Msg = "无权限编辑此页面"; } else { AppPageKitList = new Psd.H5Show.BLL.apppageinfo().GetModelList(" Pageid='" + pagecode + "'"); json.Data = AppPageKitList; } } } return(json); }
/// <summary> /// 修改页面基本信息 /// </summary> /// <param name="t">操作类型.</param> /// <param name="val">The value.</param> /// <param name="appcode">The appcode.</param> /// <returns></returns> public ActionResult EditAppBase(string t, string val, string appcode) { JsonResult json = new JsonResult(); json.JsonRequestBehavior = JsonRequestBehavior.AllowGet; try { appbase appBase = GetAppbase(appcode); switch (t) { case "bg": appBase.BgImg = val; break; case "mp3": appBase.BgMusic = val; break; default: Msg.Result = 0; Msg.Msg = "错误操作"; break; } if (new Psd.H5Show.BLL.appbase().Update(appBase)) { Msg.Result = 1; Msg.Msg = "ok"; } else { Msg.Result = 0; Msg.Msg = "更新失败"; } } catch (Exception es) { Msg.Result = 0; Msg.Msg = es.ToString(); throw; } json.Data = Msg; return(json); }
public ActionResult EditPageCreateKitActionResult(string pagecode, string t) { user_account userAccount = new user_account(); apppagebase appPageBase = new apppagebase(); appbase appBase = new appbase(); JsonResult jsonResult = new JsonResult(); jsonResult.JsonRequestBehavior = JsonRequestBehavior.AllowGet; pagecode = DESEncrypt.Decrypt(pagecode); if (pagecode == null) { Msg.Result = 0; Msg.Msg = "错误编码"; } else { appPageBase = new Psd.H5Show.BLL.apppagebase().GetModel(int.Parse(pagecode)); appBase = new Psd.H5Show.BLL.appbase().GetModel(appPageBase.AppId); if (Request.Cookies["PsdH5ShowUserCode"] == null) { Msg.Result = 0; Msg.Msg = "哎哟,你还未登录呢"; } else { userAccount = Psd.H5Show.BLL.AppTools.GetUserCodeToUseraccountModel( Request.Cookies["PsdH5ShowUserCode"].Value.ToString()); if (!userAccount.ID.Equals(appBase.Uid)) { Msg.Result = 0; Msg.Msg = "无权限编辑此页面"; } else { switch (t) { case "image": //图片类型 图片控件初始化加载 配置 apppageinfo appPageInfo = new apppageinfo(); appPageInfo.PageId = int.Parse(pagecode); appPageInfo.KitAnDelay = 0.5; appPageInfo.KitAnDuration = 0.5; appPageInfo.KitAnEffect = "fadeInUp"; appPageInfo.KitAngleZ = "0"; appPageInfo.KitLeft = "0px"; appPageInfo.KitTop = "0px"; appPageInfo.KitType = t; appPageInfo.KitStyle = ""; appPageInfo.KitLinkUrl = ""; appPageInfo.KitLinkType = 0; appPageInfo.KitWidth = "auto"; appPageInfo.KitHeight = "auto"; appPageInfo.KitContent = "<img src=\"../../content/image/demo.png\">"; appPageInfo.ID = Psd.H5Show.BLL.AppTools.getMaxIdToTable("apppageinfo") + 1; var imgcontrol = "<div class='imgview ani' swiper-animate-effect='" + appPageInfo.KitAnEffect + "' swiper-animate-duration='" + appPageInfo.KitAnDuration + "s' swiper-animate-delay='" + appPageInfo.KitAnDelay + "s' width='" + appPageInfo.KitWidth + "' " + " Ptype='imgview' link='" + appPageInfo.KitLinkType + "|" + appPageInfo.KitLinkUrl + "' id='" + appPageInfo.ID.ToString() + "' style='style='left:" + appPageInfo.KitTop + ";top:" + appPageInfo.KitTop + ";z-index:1'>" + appPageInfo.KitContent + "</div >"; try { new Psd.H5Show.BLL.apppageinfo().Add(appPageInfo); List <apppageinfo> KitList = new Psd.H5Show.BLL.apppageinfo().GetModelList(" PageId='" + pagecode + "'"); Msg.Result = 1; Msg.Msg = imgcontrol; } catch (Exception es) { Msg.Msg = es.ToString(); throw; } break; default: break; } } } } jsonResult.Data = Msg; return(jsonResult); }