Example #1
0
        public static AddShelfResult AddShelves(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(CommonJsonSend.Send <AddShelfResult>(accessToken, urlFormat, data));
        }
Example #2
0
        public static async Task <WxJsonResult> ModShelvesAsync(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(await CommonJsonSend.SendAsync <WxJsonResult>(accessToken, urlFormat, data));
        }