This commit is contained in:
zpc 2025-08-18 15:43:05 +08:00
parent 7e88d4620e
commit 0d094db7d3

View File

@ -25,7 +25,7 @@ namespace ZR.Admin.WebApi.Controllers
private IWebHostEnvironment WebHostEnvironment; private IWebHostEnvironment WebHostEnvironment;
private ISysFileService SysFileService; private ISysFileService SysFileService;
private readonly IStringLocalizer<SharedResource> _localizer; private readonly IStringLocalizer<SharedResource> _localizer;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@ -43,7 +43,7 @@ namespace ZR.Admin.WebApi.Controllers
SysFileService = fileService; SysFileService = fileService;
OptionsSetting = options.Value; OptionsSetting = options.Value;
_localizer = stringLocalizer; _localizer = stringLocalizer;
} }
/// <summary> /// <summary>
@ -201,5 +201,19 @@ namespace ZR.Admin.WebApi.Controllers
string fileName = Path.GetFileName(fullPath); string fileName = Path.GetFileName(fullPath);
return DownFile(fullPath, fileName); return DownFile(fullPath, fileName);
} }
/// <summary>
/// home
/// </summary>
/// <returns></returns>
[Route("/config")]
[HttpGet]
[AllowAnonymous]
public async Task<IActionResult> GetConfig()
{
var file = await SysFileService.AsQueryable().Where(x => x.ClassifyType == "watermark").FirstAsync();
return SUCCESS(new { logo = file?.AccessUrl ?? "" });
}
} }
} }