protected override void OnActionExecuting(ActionExecutingContext filterContext) { base.OnActionExecuting(filterContext); bool isclose = true; var dissetting = _iDistributionService.GetDistributionSetting(); if (dissetting != null) { if (dissetting.Enable) { isclose = false; } } if (isclose && RouteData.Values["action"].ToString().ToLower() != "nosetting") { Response.Clear(); Response.BufferOutput = true; Response.Redirect(Url.Action("NoSetting")); } curshopid = CurrentSellerManager.ShopId; distributorConfig = _iDistributionService.getShopDistributorSettingInfo(curshopid); if (distributorConfig.DistributorDefaultRate > 0) { isConfigRight = true; } }
/// <summary> /// 店铺详情 /// <para>销售员查看</para> /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult ShopDetail(long id) { var shop = _iShopService.GetShop(id); if (shop == null) { throw new HimallException("错误的店铺编号"); } CheckPromoter(); var shareInfo = _iDistributionService.getShopDistributorSettingInfo(id); DistributionShopShowModel model = new DistributionShopShowModel(); if (shareInfo != null) { model.ShopShareLogo = string.IsNullOrWhiteSpace(shareInfo.DistributorShareLogo) ? "" : Core.HimallIO.GetRomoteImagePath(shareInfo.DistributorShareLogo); model.ShopShareTitle = shareInfo.DistributorShareName; model.ShopShareDesc = shareInfo.DistributorShareContent; } model.ShopName = shop.ShopName; model.ShopId = id; model.UserId = curUserId; if (shop.Himall_VShop.Any()) { model.ShopLogo = Core.HimallIO.GetRomoteImagePath(shop.Himall_VShop.FirstOrDefault().BackgroundImage); } if (CurrentUser != null) { model.isFavorite = _iShopService.GetFavoriteShopInfos(CurrentUser.Id).Any(d => d.ShopId == id); } return(View(model)); }
protected override void OnActionExecuting(ActionExecutingContext filterContext) { base.OnActionExecuting(filterContext); curshopid = CurrentSellerManager.ShopId; distributorConfig = _iDistributionService.getShopDistributorSettingInfo(curshopid); }