添加项目文件。

This commit is contained in:
cmn
2025-11-27 16:58:03 +08:00
parent c5adc0a415
commit ee1bb22e95
23 changed files with 2447 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
using NetTaste;
using System;
using System.Collections.Generic;
using System.Net;
using System.Text;
using TelegramService.Help;
namespace TelegramService.Bl
{
public class SendMessageBl
{
public static async Task<bool> SendWx(string url,string msg)
{
HttpResult httpResult;
for (int i = 0; i < 2; i++)
{
httpResult = await HttpHelper.PostJsonAsync(url, msg);
if (httpResult.StatusCode != 200)
{
continue;
}
if (httpResult.Html.IndexOfStr("\"errmsg\":\"ok\""))
{
return true;
}
}
return false;
}
public static async Task<bool> SendTg(string url,string msg)
{
HttpResult httpResult = null;
for (int i = 0; i < 2; i++)
{
httpResult = await HttpHelper.PostJsonAsync(url, msg);
if (httpResult.StatusCode != 200)
{
continue;
}
if (httpResult.Html.IndexOfStr("\"ok\":true,"))
{
return true;
}
}
return false;
}
}
}