Преглед на файлове

添加静态资源路由

lcl преди 8 месеца
родител
ревизия
536146c2d6
променени са 5 файла, в които са добавени 13 реда и са изтрити 2 реда
  1. BIN
      .DS_Store
  2. 6 0
      Controllers/Client/AppController.cs
  3. 1 0
      Controllers/FileUpdateInfoController.cs
  4. 6 0
      Model/Vo/Client/AppStaticFilesVo.cs
  5. 0 2
      Model/Vo/FileUpdateInfoListVo.cs

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>