using System; using System.Collections.Generic; using System.Text; namespace CommonUtil.Web { /// /// 发送企微机器人 /// public class SendQwGroup { /// /// /// public static void SendMessage(string message) { try { string webhook = ConfigUtil.GetValue("qw_webhook"); if(webhook.IsNullOrEmpty()) { return; } string body = "{\"msgtype\": \"markdown\",\"markdown\":{\"content\":\"" + message + "\"}}"; string res = new WebUtil().DoPostWithJson(webhook, body, null); body = "{\"msgtype\": \"text\",\"text\":{\"content\":\"您有新的消息需要处理\",\"mentioned_mobile_list\":[\"13382447768\",\"15862977578\",\"17315773080\"]}}"; res = new WebUtil().DoPostWithJson(webhook, body, null); } catch { } } } }