public static void Send()
{
dynamic postData = new ExpandoObject();
postData.touser = "OpenId";
postData.template_id = "template_id";
postData.url = string.Empty;
postData.topcolor = "#FF";
postData.data = new ExpandoObject();
var data = new[]
{
new Tuple<string, string, string>("title", "航班延误通知", "#FF"),
new Tuple<string, string, string>("trainNumber", "分钟", "#FF"),
new Tuple<string, string, string>("fromto", "上海-北京", "#FF"),
new Tuple<string, string, string>("formerTime", "// ::", "#FF"),
new Tuple<string, string, string>("Time", "// ::", "#FF"),
new Tuple<string, string, string>("number", "分钟", "#FF"),
new Tuple<string, string, string>("reason", "天气原因", "#FF"),
new Tuple<string, string, string>("remark", "请关注我们的微信通知", "#FF")
};
var dataDict = (IDictionary<string, object>)postData.data;
foreach (var item in data)
{
dataDict.Add(item.Item, new { value = item.Item, color = item.Item });
}
string json = ((object)postData).Serialize();
Console.WriteLine(json);
var r = NetUtils.CreateHttpResponse(@"https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=@access_token", json);
Console.WriteLine(r);
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有