Example #1
0
        public static Response <ResponseBodyEmpty> Do(STModuleInfo info, string delids)
        {
            RequestOpPicModuleItem body = new RequestOpPicModuleItem();

            body.st_id           = info.st_id.ToString();
            body.st_module_id    = info.st_module_id.ToString();
            body.allow_show_name = info.allow_show_name;
            body.module_name     = info.module_name;
            body.cell_count      = info.cell_count;

            List <CarouselModuleItem> list = new List <CarouselModuleItem>();

            foreach (STItemInfo item in info.topic_item_list)
            {
                CarouselModuleItem em = new CarouselModuleItem();
                em.st_item_id   = item.st_item_id.ToString();
                em.sort_no      = item.sort_no.ToString();
                em.item_img_src = item.item_img_src;
                em.item_name    = item.item_name;
                em.page_src     = item.page_src;
                list.Add(em);
            }
            body.item_list    = list;
            body.del_item_ids = delids.Split(',');
            Request <RequestOpPicModuleItem> request = new Request <RequestOpPicModuleItem>();

            request.Body   = body;
            request.Header = request.NewHeader();
            request.Key    = "OpTopicPicModule";
            string requestStr  = JsonHelper.ObjectToJson <Request <RequestOpPicModuleItem> >(request);
            string responseStr = HttpUtils.HttpPost(requestStr);
            var    response    = JsonHelper.JsonToObject <Response <ResponseBodyEmpty> >(responseStr);

            return(response);
        }
Example #2
0
        public static Response <ResponseBodyEmpty> Do(STModuleInfo info, string delids)
        {
            RequestOpPhoneModuleItem body = new RequestOpPhoneModuleItem();

            body.st_id        = info.st_id.ToString();
            body.st_module_id = info.st_module_id.ToString();
            body.module_desc  = info.module_desc;
            List <HotAreaList> list = new List <HotAreaList>();

            if (info.topic_item_list != null)
            {
                foreach (STItemInfo item in info.topic_item_list)
                {
                    HotAreaList em = new HotAreaList();
                    em.itemid     = item.st_item_id.ToString();
                    em.area       = item.item_name.ToString();
                    em.sort_no    = item.sort_no.ToString();
                    em.url        = item.item_img_src;
                    em.product_id = item.product_id.ToString();
                    list.Add(em);
                }
            }
            body.hotarealist  = list;
            body.del_item_ids = delids.Split(',');
            Request <RequestOpPhoneModuleItem> request = new Request <RequestOpPhoneModuleItem>();

            request.Body   = body;
            request.Header = request.NewHeader();
            request.Key    = "OpTopicPhoneItemsModule";
            string requestStr  = JsonHelper.ObjectToJson <Request <RequestOpPhoneModuleItem> >(request);
            string responseStr = HttpUtils.HttpPost(requestStr);
            var    response    = JsonHelper.JsonToObject <Response <ResponseBodyEmpty> >(responseStr);

            return(response);
        }
Example #3
0
        public static Response <ResponseBodyEmpty> Do(STModuleInfo info)
        {
            RequestOpModuleText body = new RequestOpModuleText();

            body.st_module_id    = info.st_module_id.ToString();
            body.is_full_screen  = info.is_full_screen.ToString();
            body.allow_show_name = info.allow_show_name.ToString();
            body.module_name     = info.module_name;
            body.module_desc     = info.module_desc;
            body.module_content  = info.module_content;

            Request <RequestOpModuleText> request = new Request <RequestOpModuleText>();

            request.Body   = body;
            request.Header = request.NewHeader();
            request.Key    = "OpTopicTextModule";
            string requestStr = JsonHelper.ObjectToJson <Request <RequestOpModuleText> >(request);

            ;
            string responseStr = HttpUtils.HttpPost(requestStr);

            ;
            var response = JsonHelper.JsonToObject <Response <ResponseBodyEmpty> >(responseStr);

            return(response);
        }
Example #4
0
        public static Response <ResponseBodyEmpty> Do(STModuleInfo info)
        {
            RequestOpModulePaging body = new RequestOpModulePaging();

            body.st_id           = info.st_id.ToString();
            body.st_module_id    = info.st_module_id.ToString();
            body.is_full_screen  = info.is_full_screen.ToString();
            body.allow_show_name = info.allow_show_name.ToString();
            body.module_name     = info.module_name;
            body.module_desc     = info.module_desc;
            body.module_content  = info.module_content;
            body.cell_count      = info.cell_count.ToString();
            body.sort_column     = info.sort_column;
            body.allow_paging    = info.allow_paging.ToString();
            body.product_brand   = info.product_brand;
            body.product_type    = info.product_type.ToString();
            body.page_size       = info.page_size.ToString();
            body.shop_id         = info.shop_id.ToString();

            Request <RequestOpModulePaging> request = new Request <RequestOpModulePaging>();

            request.Body   = body;
            request.Header = request.NewHeader();
            request.Key    = "OpTopicPagingModule";
            string requestStr = JsonHelper.ObjectToJson <Request <RequestOpModulePaging> >(request);

            ;
            string responseStr = HttpUtils.HttpPost(requestStr);

            ;
            var response = JsonHelper.JsonToObject <Response <ResponseBodyEmpty> >(responseStr);

            return(response);
        }
        public static Response <ResponseBodyEmpty> Do(STModuleInfo info, string delids)
        {
            RequestOpModuleItem body = new RequestOpModuleItem();

            body.st_id           = info.st_id.ToString();
            body.st_module_id    = info.st_module_id.ToString();
            body.is_full_screen  = info.is_full_screen.ToString();
            body.allow_show_name = info.allow_show_name.ToString();
            body.module_name     = info.module_name;
            body.module_desc     = info.module_desc;
            body.cell_count      = info.cell_count.ToString();
            List <ModuleProduct> list = new List <ModuleProduct>();

            foreach (STItemInfo item in info.topic_item_list)
            {
                ModuleProduct em = new ModuleProduct();
                em.st_item_id = item.st_item_id.ToString();
                em.product_id = item.product_id.ToString();
                em.sort_no    = item.sort_no.ToString();
                em.start_time = item.start_time;
                em.end_time   = item.end_time;
                list.Add(em);
            }
            body.product_list = list;
            body.del_item_ids = delids.Split(',');
            Request <RequestOpModuleItem> request = new Request <RequestOpModuleItem>();

            request.Body   = body;
            request.Header = request.NewHeader();
            request.Key    = "OpTopicItemsModule";
            string requestStr  = JsonHelper.ObjectToJson <Request <RequestOpModuleItem> >(request);
            string responseStr = HttpUtils.HttpPost(requestStr);
            var    response    = JsonHelper.JsonToObject <Response <ResponseBodyEmpty> >(responseStr);

            return(response);
        }