using Furion.HttpRemote; namespace YD_Event.Application; /// /// 第三方API调用 /// public class ApiService : IScoped { private const string BaseUrl = "https://api.wer.plus"; /// /// 检查 文本内容是否包含违禁词 /// /// 内容 /// public async Task Keywords([FromQuery] string content) { try { var httpRemoteService = App.GetRequiredService(); var dto = await httpRemoteService.GetAsAsync($"{BaseUrl}/api/min"); //var dto = await $"{BaseUrl}/api/min".SetQueries(new { t = content }).GetAsAsync(); return dto.Success && dto.Num > 0; } catch (Exception e) { return false; } } }