From 0d094db7d3fc1c9f1835701dea30888aedab408f Mon Sep 17 00:00:00 2001 From: zpc Date: Mon, 18 Aug 2025 15:43:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/CommonController.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/ZR.Admin.WebApi/Controllers/CommonController.cs b/ZR.Admin.WebApi/Controllers/CommonController.cs index fd2631b..6e387fd 100644 --- a/ZR.Admin.WebApi/Controllers/CommonController.cs +++ b/ZR.Admin.WebApi/Controllers/CommonController.cs @@ -25,7 +25,7 @@ namespace ZR.Admin.WebApi.Controllers private IWebHostEnvironment WebHostEnvironment; private ISysFileService SysFileService; private readonly IStringLocalizer _localizer; - + /// /// /// @@ -43,7 +43,7 @@ namespace ZR.Admin.WebApi.Controllers SysFileService = fileService; OptionsSetting = options.Value; _localizer = stringLocalizer; - + } /// @@ -201,5 +201,19 @@ namespace ZR.Admin.WebApi.Controllers string fileName = Path.GetFileName(fullPath); return DownFile(fullPath, fileName); } + + /// + /// home + /// + /// + [Route("/config")] + [HttpGet] + [AllowAnonymous] + public async Task GetConfig() + { + var file = await SysFileService.AsQueryable().Where(x => x.ClassifyType == "watermark").FirstAsync(); + return SUCCESS(new { logo = file?.AccessUrl ?? "" }); + } + } }