fix 多钱包调整
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Dlhis.Middle.Filters;
|
||||
using Dlhis.Middle.Services;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
@@ -12,14 +13,13 @@ namespace Dlhis.Middle.Controllers;
|
||||
public class GainfosController : ControllerBase
|
||||
{
|
||||
private readonly IHttpClientFactory _httpClientFactory;
|
||||
private readonly IConfiguration _configuration;
|
||||
private readonly ILogger<GainfosController> _logger;
|
||||
private readonly ISettingService _settingService;
|
||||
|
||||
public GainfosController(IHttpClientFactory httpClientFactory, IConfiguration configuration, ILogger<GainfosController> logger)
|
||||
public GainfosController(IHttpClientFactory httpClientFactory,
|
||||
ISettingService settingService)
|
||||
{
|
||||
_httpClientFactory = httpClientFactory;
|
||||
_configuration = configuration;
|
||||
_logger = logger;
|
||||
_settingService = settingService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -32,14 +32,11 @@ public class GainfosController : ControllerBase
|
||||
[HttpGet("face")]
|
||||
public async Task<IActionResult> GetFaceAsync(string token)
|
||||
{
|
||||
var hostName = _configuration.GetSection("HostName").Value;
|
||||
var httpClient = _httpClientFactory.CreateClient("face");
|
||||
|
||||
_logger.LogInformation("token:{token}", token);
|
||||
var httpClient = _httpClientFactory.CreateClient();
|
||||
|
||||
try
|
||||
{
|
||||
var faceBytes = await httpClient.GetByteArrayAsync($"https://{hostName}/api/basic/gainfos/face?token={token}");
|
||||
var faceBytes = await httpClient.GetByteArrayAsync($"{_settingService.GetBaseUrl()}/api/basic/gainfos/face?token={token}");
|
||||
|
||||
if (faceBytes.Length == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user