Exemplo n.º 1
0
        public static WxJsonResult ModShelves(string accessToken, M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, int shelfId, string shelfBanner, string shelfName)
        {
            var urlFormat = WxConfig.ApiMpHost + "/merchant/shelf/mod?access_token={0}";

            var data = new
            {
                shelf_id   = shelfId,
                shelf_data = new
                {
                    module_infos = new object[]
                    {
                        m1,
                        m2,
                        m3,
                        m4,
                        m5
                    }
                },
                shelf_banner = shelfBanner,
                shelf_name   = shelfName
            };

            return(CommonJsonSend.Send <WxJsonResult>(accessToken, urlFormat, data));
        }
Exemplo n.º 2
0
        public static async Task <AddShelfResult> AddShelvesAsync(string accessToken, M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, string shelfBanner, string shelfName)
        {
            var urlFormat = WxConfig.ApiMpHost + "/merchant/shelf/add?access_token={0}";

            var data = new
            {
                shelf_data = new
                {
                    module_infos = new object[]
                    {
                        m1,
                        m2,
                        m3,
                        m4,
                        m5
                    }
                },
                shelf_banner = shelfBanner,
                shelf_name   = shelfName
            };

            return(await CommonJsonSend.SendAsync <AddShelfResult>(accessToken, urlFormat, data));
        }