feat: 新增灵田 秘境结算持久化
This commit is contained in:
@@ -7,5 +7,9 @@
|
||||
{
|
||||
public const string GoodsKey = "GoodsInfo";
|
||||
|
||||
public const string MiJingKey = "MiJing:";
|
||||
|
||||
public const string LingTianKey = "LingTian:";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Flurl.Http;
|
||||
using Furion.Logging;
|
||||
using NapCatRobotClient.Core.RobotAPI.Dto.Request;
|
||||
|
||||
namespace NapCatRobotClient.Core.RobotAPI
|
||||
@@ -27,12 +28,21 @@ namespace NapCatRobotClient.Core.RobotAPI
|
||||
|
||||
private static async Task<string> Post(string parameters, string action)
|
||||
{
|
||||
string url = App.Configuration["QQConfig:SendApiUrl"] + action;
|
||||
string response = await url.WithHeader("Authorization", "Bearer " + App.Configuration["QQConfig:AccessToken"])
|
||||
.WithHeader("Content-Type", "application/json;charset=utf-8")
|
||||
.PostStringAsync(parameters)
|
||||
.ReceiveString();
|
||||
return response;
|
||||
try
|
||||
{
|
||||
string url = App.Configuration["QQConfig:SendApiUrl"] + action;
|
||||
string response = await url.WithHeader("Authorization", "Bearer " + App.Configuration["QQConfig:AccessToken"])
|
||||
.WithHeader("Content-Type", "application/json;charset=utf-8")
|
||||
.AllowAnyHttpStatus()
|
||||
.PostStringAsync(parameters)
|
||||
.ReceiveString();
|
||||
return response;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error($"RobotAPI 请求异常,请求参数:{parameters},请求地址:{action} {ex.Message},{ex.StackTrace}");
|
||||
return default;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user