李昊 4 年之前
父節點
當前提交
6992c90bf5

+ 4 - 0
gx_api/GxPress/Repository/GxPress.Repository.Implement/Media/MediaRepository.cs

@@ -738,6 +738,8 @@ namespace GxPress.Repository.Implement.Media
                 query.OrderByDesc(nameof(Entity.tede2.Media.Media.CreatedDate));
             query.ForPage(request.Page, request.PerPage);
             resut.Items = await _repository.GetAllAsync<MediaCathedraResult>(query);
+            foreach (var item in resut.Items)
+                item.ImageUrls = StringUtils.AddDomain(item.ImageUrls);
             return resut;
         }
 
@@ -938,6 +940,8 @@ namespace GxPress.Repository.Implement.Media
                 query.OrderByDesc(nameof(Entity.tede2.Media.Media.CreatedDate));
             query.ForPage(request.Page, request.PerPage);
             resut.Items = await _repository.GetAllAsync<MediaCathedraResult>(query);
+            foreach (var item in resut.Items)
+                item.ImageUrls = StringUtils.AddDomain(item.ImageUrls);
             return resut;
         }
     }

+ 2 - 2
gx_api/GxPress/Service/GxPress.Service.Implement/AppChannel/AppChannelService.cs

@@ -62,12 +62,12 @@ namespace GxPress.Service.Implement.AppChannel
             {
                 if (!item.IsChildren)
                     item.MediaIds = await channelCategoryMediaRepository.GetAllAsync(item.Id);
-                else
+                if (item.IsChildren)
                 {
                     foreach (var category in item.Children)
                     {
                         if (!category.IsChildren)
-                            category.MediaIds = await channelCategoryMediaRepository.GetAllAsync(item.Id);
+                            category.MediaIds = await channelCategoryMediaRepository.GetAllAsync(category.Id);
                     }
                 }
             }