Ver código fonte

添加静态资源路由

lcl 8 meses atrás
pai
commit
536146c2d6

BIN
.DS_Store


+ 6 - 0
Controllers/Client/AppController.cs

@@ -65,6 +65,12 @@ namespace Controllers
         public IActionResult StaticFiles([FromQuery] AppStaticFilesDto parm)
         {
             var response = _FileUpdateInfoService.StaticFiles(parm);
+            OssConfigs ossConfigs = new();
+            AppSettings.Bind("OssConfigs", ossConfigs);
+            foreach(var sub in response.Records)
+            {
+                sub.downloadUrl = ossConfigs.Host + "skin/app/" + parm.kind + "/" + sub.path + sub.fileName;
+            }
             return SUCCESS(response);
         }
 

+ 1 - 0
Controllers/FileUpdateInfoController.cs

@@ -12,6 +12,7 @@ using Middleware;
 using Model;
 using Services;
 using Model.Base;
+using Base;
 
 namespace Controllers
 {

+ 6 - 0
Model/Vo/Client/AppStaticFilesVo.cs

@@ -43,6 +43,12 @@ namespace Vo
         public DateTime? createDate { get; set; }
 
 
+        /// <summary>
+        /// 下载地址
+        /// </summary>
+        public string downloadUrl { get; set; }
+
+
 
     }
 }

+ 0 - 2
Model/Vo/FileUpdateInfoListVo.cs

@@ -1,5 +1,3 @@
-using Newtonsoft.Json;
-
 namespace Vo
 {
     /// <summary>