Пример #1
0
        public JsonResult APPGuidePages(List <string> pics)
        {
            List <Himall.DTO.SlideAdModel> list = new List <Himall.DTO.SlideAdModel>();

            foreach (string str in pics)
            {
                if (!string.IsNullOrWhiteSpace(str))
                {
                    Himall.DTO.SlideAdModel item = new Himall.DTO.SlideAdModel
                    {
                        ImageUrl = str
                    };
                    list.Add(item);
                }
            }
            if (list.Count == 0)
            {
                throw new HimallException("至少上传一张引导页图");
            }
            SlideApplication.AddGuidePages(list);
            BaseController.Result data = new BaseController.Result
            {
                success = true
            };
            return(base.Json(data));
        }
Пример #2
0
        public JsonResult APPGuidePages(List <string> pics)
        {
            List <Himall.DTO.SlideAdModel> list = new List <DTO.SlideAdModel>();

            foreach (var p in pics)
            {
                if (!string.IsNullOrWhiteSpace(p))
                {
                    list.Add(new DTO.SlideAdModel()
                    {
                        ImageUrl = p
                    });
                }
            }
            if (list.Count == 0)
            {
                throw new HimallException("至少上传一张引导页图");
            }
            SlideApplication.AddGuidePages(list);
            return(Json(new { success = true }));
        }