public object GetTagsInfo(long id) { var tag = ShopBranchApplication.GetShopBranchTagInfo(id); if (null == tag) { throw new MallException("非法参数!"); } return(Json(new { Id = tag.Id, Title = tag.Title, ShopBranchCount = tag.ShopBranchCount })); }
/// <summary> /// 获取门店标签信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public JsonResult <Result <dynamic> > GetTagsInfo(long id) { var tag = ShopBranchApplication.GetShopBranchTagInfo(id); if (null == tag) { throw new HimallException("非法参数!"); } return(JsonResult <dynamic>(new { Id = tag.Id, Title = tag.Title, ShopBranchCount = tag.ShopBranchCount })); }
///// <summary> ///// 修改同步小程序状态 ///// </summary> ///// <param name="type"></param> ///// <param name="status"></param> ///// <returns></returns> //[HttpPost] //public JsonResult ShopBranchSettingUpdateAppletSyncStatus(int type, bool status) //{ // var setting = SiteSettingApplication.SiteSettings; // switch (type) // { // case 1: // setting.O2OApplet_IsUseTopSlide = status; // break; // case 2: // setting.O2OApplet_IsUseIconArea = status; // break; // case 3: // setting.O2OApplet_IsUseAdArea = status; // break; // case 4: // setting.O2OApplet_IsUseMiddleSlide = status; // break; // default: // return Json(new Result { success = false, status = -1, msg = "错误的操作参数" }); // } // SiteSettingApplication.SaveChanges(); // return Json(new Result { success = true, status = 1, msg = "操作成功" }); //} private string GetLinkName(string url) { var arr = url.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); if (arr.Length == 2) { var strID = arr[1].Substring(arr[1].LastIndexOf('/') + 1); long id = 0; long.TryParse(strID, out id); switch (arr[0]) { case "1": { var model = ShopBranchApplication.GetShopBranchTagInfo(id, false); if (null != model) { return(model.Title); } } break; case "2": { var model = ShopBranchApplication.GetShopBranchById(id); if (null != model) { return(model.ShopBranchName); } } break; case "3": { var model = TopicApplication.GetTopic(id); if (null != model) { return(model.Name); } } break; } } return(""); }
private string GetLinkName(string url) { string[] strArray = url.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); if (strArray.Length == 2) { string s = strArray[1].Substring(strArray[1].LastIndexOf('/') + 1); long result = 0L; long.TryParse(s, out result); string str3 = strArray[0]; if (str3 != null) { if (!(str3 == "1")) { if (str3 == "2") { ShopBranch shopBranchById = ShopBranchApplication.GetShopBranchById(result); if (null != shopBranchById) { return(shopBranchById.ShopBranchName); } } else if (str3 == "3") { TopicInfo topicInfo = this._iTopicService.GetTopicInfo(result); if (null != topicInfo) { return(topicInfo.Name); } } } else { ShopBranchTagModel shopBranchTagInfo = ShopBranchApplication.GetShopBranchTagInfo(result); if (null != shopBranchTagInfo) { return(shopBranchTagInfo.Title); } } } } return(""); }