// GET: Mobile/Home public ActionResult Index(int ispv = 0, string tn = "") { string crrentTemplateName = "t1"; var curr = _iTemplateSettingsService.GetCurrentTemplate(0); if (null != curr) { crrentTemplateName = curr.CurrentTemplateName; } if (ispv == 1) { if (!string.IsNullOrWhiteSpace(tn)) { crrentTemplateName = tn; } } ViewBag.Title = SiteSettings.SiteName + "首页"; ViewBag.FootIndex = 0; var services = CustomerServiceApplication.GetPlatformCustomerService(true, true); ViewBag.CustomerServices = services; VTemplateHelper.DownloadTemplate(crrentTemplateName, VTemplateClientTypes.WapIndex, 0); return(View(string.Format("~/Areas/Admin/Templates/vshop/{0}/Skin-HomePage.cshtml", crrentTemplateName))); }
public ActionResult HomePageSetting() { var model = new VTemplateEditModel(); model.ClientType = VTemplateClientTypes.WXSmallProgram; model.Name = "smallprog"; //门店授权 ViewBag.IsOpenStore = SiteSettingApplication.SiteSettings != null && SiteSettingApplication.SiteSettings.IsOpenStore; VTemplateHelper.DownloadTemplate("", model.ClientType, 0); return(View(model)); }
//APP首页配置共用于安卓和IOS,这里的平台类型写的为IOS,安卓调用首页接口数据时平台类型也选IOS public ActionResult AppHomePageSetting() { VTemplateEditModel model = new Models.VTemplateEditModel(); model.ClientType = VTemplateClientTypes.AppIndex; model.Name = "APP"; //门店授权 ViewBag.IsOpenStore = SiteSettingApplication.SiteSettings != null && SiteSettingApplication.SiteSettings.IsOpenStore; VTemplateHelper.DownloadTemplate("", VTemplateClientTypes.AppIndex, 0); return(View(model)); }
public ActionResult Detail(long id) { TopicInfo topicInfo = this._iTopicService.GetTopicInfo(id); string str = VTemplateHelper.GetTemplatePath(id.ToString(), VTemplateClientTypes.WapSpecial, 0L); string viewName = "~" + str + "Skin-HomePage.cshtml"; if (topicInfo != null) { ((dynamic)base.ViewBag).Title = "专题-" + topicInfo.Name; } VTemplateHelper.DownloadTemplate(id.ToString(), VTemplateClientTypes.WapSpecial, 0L); return(base.View(viewName, topicInfo)); }
/// <summary> /// 模板编辑 /// </summary> /// <param name="client"></param> /// <param name="tName"></param> /// <returns></returns> public ActionResult EditTemplate(int client = 1, string tName = "t1") { VTemplateEditModel model = new VTemplateEditModel(); model.Name = tName; model.ClientType = (VTemplateClientTypes)client; model.IsShowPrvPage = true; string templateName = "EditTemplate"; switch (model.ClientType) { case VTemplateClientTypes.WapSpecial: case VTemplateClientTypes.SellerWapSpecial: model.IsShowTitle = true; model.IsShowTags = true; model.IsShowPrvPage = false; model.IsShowIcon = true; break; case VTemplateClientTypes.AppSpecial: model.IsShowTitle = true; model.IsShowTags = true; model.IsShowPrvPage = false; model.IsShowIcon = true; templateName = "EditTemplate-AppTopic"; break; case VTemplateClientTypes.WXSmallProgramSpecial: model.IsShowTitle = true; model.IsShowTags = true; model.IsShowPrvPage = false; model.IsShowIcon = true; templateName = "EditTemplate-AppletTopic"; break; } //门店授权 ViewBag.IsOpenStore = SiteSettingApplication.SiteSettings != null && SiteSettingApplication.SiteSettings.IsOpenStore; VTemplateHelper.DownloadTemplate(model.Name, model.ClientType); return(View(templateName, model)); }
public ActionResult Detail(long id) { var topic = TopicApplication.GetTopic(id); string tmppath = VTemplateHelper.GetTemplatePath(id.ToString(), VTemplateClientTypes.WapSpecial); tmppath = "~" + tmppath; string viewpath = tmppath + "Skin-HomePage.cshtml"; if (topic != null) {//判空处理 ViewBag.Title = "专题-" + topic.Name; } else { throw new Himall404(); } VTemplateHelper.DownloadTemplate(id.ToString(), VTemplateClientTypes.WapSpecial); ViewBag.ShopId = topic.ShopId; var vshop = VshopApplication.GetVShopByShopId(topic.ShopId); ViewBag.VshopId = vshop == null ? 0 : vshop.Id; return(View(viewpath, topic)); }