Example #1
0
        public JsonResult PostActiveList(FightGroupActiveQuery query)
        {
            query.ShopId = CurrentShop.Id;
            var data = FightGroupApplication.GetActives(query);

            return(Json(data));
        }
Example #2
0
        public JsonResult PostActiveList(int page)
        {
            int pageSize = 5;
            QueryPageModel <FightGroupActiveListModel> model = FightGroupApplication.GetActives(new List <FightGroupActiveStatus> {
                0, FightGroupActiveStatus.WillStart
            }, "", "", null, page, pageSize);
            List <FightGroupActiveListModel> list2 = model.Models.ToList <FightGroupActiveListModel>();

            return(base.Json(new { success = true, rows = list2, total = model.Total }));
        }
        public JsonResult PostActiveList(FightGroupActiveQuery query)
        {
            query.SaleStatus       = ProductSaleStatus.OnSale;//已销售状态商品
            query.PageSize         = 5;
            query.ActiveStatusList = new List <FightGroupActiveStatus> {
                FightGroupActiveStatus.Ongoing,
                FightGroupActiveStatus.WillStart
            };
            var data = FightGroupApplication.GetActives(query);

            return(Json(new { success = true, data = data.Models, total = data.Total }));
        }
        public JsonResult PostActiveList(int page)
        {
            int pagesize = 5;
            List <FightGroupActiveStatus> seastatus = new List <FightGroupActiveStatus>();

            seastatus.Add(FightGroupActiveStatus.Ongoing);
            seastatus.Add(FightGroupActiveStatus.WillStart);
            var data     = FightGroupApplication.GetActives(seastatus, "", "", null, page, pagesize);
            var datalist = data.Models.ToList();

            return(Json(new { success = true, rows = datalist, total = data.Total }));
        }
Example #5
0
        public JsonResult PostActiveList(string productName, FightGroupActiveStatus?activeStatus, string shopName, int page, int rows)
        {
            List <FightGroupActiveStatus> seastatus = new List <FightGroupActiveStatus>();

            if (activeStatus.HasValue)
            {
                seastatus.Add(activeStatus.Value);
            }
            var data = FightGroupApplication.GetActives(seastatus, productName, shopName, null, page, rows);

            return(Json(new { rows = data.Models.ToList(), total = data.Total }));
        }
        /// <summary>
        /// 获取拼团活动列表
        /// </summary>
        /// <param name="pageSize"></param>
        /// <param name="pageNo"></param>
        /// <returns></returns>
        public JsonResult <Result <dynamic> > GetActiveList(int pageSize = 5, int pageNo = 1)
        {
            FightGroupActiveQuery query = new FightGroupActiveQuery();

            query.SaleStatus       = ProductSaleStatus.OnSale;//已销售状态商品
            query.PageSize         = pageSize;
            query.PageNo           = pageNo;
            query.ActiveStatusList = new List <FightGroupActiveStatus> {
                FightGroupActiveStatus.Ongoing,
                FightGroupActiveStatus.WillStart
            };
            var data     = FightGroupApplication.GetActives(query);
            var datalist = data.Models.ToList();

            foreach (DTO.FightGroupActiveListModel item in datalist)
            {
                if (!string.IsNullOrWhiteSpace(item.IconUrl))
                {
                    item.IconUrl = Core.HimallIO.GetRomoteImagePath(item.IconUrl);
                }
            }
            return(JsonResult <dynamic>(new { rows = datalist, total = data.Total }));
        }
Example #7
0
        public JsonResult PostActiveList(FightGroupActiveQuery query)
        {
            var data = FightGroupApplication.GetActives(query);

            return(Json(data, true));
        }