|
@@ -53,13 +53,29 @@ namespace GxPress.Service.Implement.AppHomePage
|
|
|
//大师讲座
|
|
|
if (request.StyleCss == "Cathedra")
|
|
|
{
|
|
|
- request.Sort = "recommend";
|
|
|
- request.PerPage=30;
|
|
|
+ request.Sort = "";
|
|
|
+ request.PerPage = 30;
|
|
|
var items = await mediaRepository.GetMediasByTeacherAsync(request);
|
|
|
- results.Add(new AppLabelResult<MediaCathedraResult>() { LabelName = "今日推荐", IsPage = false, ResourceType = 40, Method = "", Items = items });
|
|
|
+ results.Add(new AppLabelResult<MediaCathedraResult>()
|
|
|
+ {
|
|
|
+ LabelName = "今日推荐",
|
|
|
+ IsPage = false,
|
|
|
+ ResourceType = 40,
|
|
|
+ Method = "",
|
|
|
+ Items = items
|
|
|
+ });
|
|
|
request.Sort = "";
|
|
|
+ request.PerPage = 10;
|
|
|
items = await mediaRepository.GetMediasByTeacherAsync(request);
|
|
|
- results.Add(new AppLabelResult<MediaCathedraResult>() { LabelName = "更多精彩", IsPage = true, ResourceType = 40, Method = "post", Items = items, ActionUrl = "api/app/page/cathedra-page" });
|
|
|
+ results.Add(new AppLabelResult<MediaCathedraResult>()
|
|
|
+ {
|
|
|
+ LabelName = "更多精彩",
|
|
|
+ IsPage = true,
|
|
|
+ ResourceType = 40,
|
|
|
+ Method = "post",
|
|
|
+ Items = items,
|
|
|
+ ActionUrl = "api/app/page/cathedra-page"
|
|
|
+ });
|
|
|
foreach (var item in results)
|
|
|
{
|
|
|
foreach (var model in item.Items)
|
|
@@ -162,12 +178,12 @@ namespace GxPress.Service.Implement.AppHomePage
|
|
|
foreach (var item in systemLabels)
|
|
|
{
|
|
|
//获取媒体标签
|
|
|
- var mediaIds = await systemLableMediaRepository.GetMediaIdsAsync(item.Id,0);
|
|
|
+ var mediaIds = await systemLableMediaRepository.GetMediaIdsAsync(item.Id, 0);
|
|
|
var medias = await mediaRepository.GetNavigationMediaResults(mediaIds, 1, item.PageSize);
|
|
|
var list = new List<MediaCathedraResult>();
|
|
|
foreach (var mediaModel in medias)
|
|
|
{
|
|
|
- list.Add(new MediaCathedraResult { Id = mediaModel.Id,Summary=mediaModel.Summary, Title = mediaModel.Title, ImageUrls = StringUtils.AddDomain(mediaModel.ImageUrls), Author = mediaModel.Author, ReadCount = mediaModel.ReadCount, CreatedDate = mediaModel.CreatedDate, CollectCount = mediaModel.CollectCount, MediaType = mediaModel.MediaType });
|
|
|
+ list.Add(new MediaCathedraResult { Id = mediaModel.Id, Summary = mediaModel.Summary, Title = mediaModel.Title, ImageUrls = StringUtils.AddDomain(mediaModel.ImageUrls), Author = mediaModel.Author, ReadCount = mediaModel.ReadCount, CreatedDate = mediaModel.CreatedDate, CollectCount = mediaModel.CollectCount, MediaType = mediaModel.MediaType });
|
|
|
}
|
|
|
//获取常规数据
|
|
|
var mediaCathedraResult = new AppLabelResult<MediaCathedraResult>()
|
|
@@ -210,7 +226,7 @@ namespace GxPress.Service.Implement.AppHomePage
|
|
|
var systemLabel = await _systemLabelRepository.GetAsync(request.LableId);
|
|
|
if (systemLabel == null)
|
|
|
return null;
|
|
|
- var ids = await systemLableMediaRepository.GetMediaIdsAsync(request.LableId,0);
|
|
|
+ var ids = await systemLableMediaRepository.GetMediaIdsAsync(request.LableId, 0);
|
|
|
request.Ids = ids.ToList();
|
|
|
request.Limit = systemLabel.PageSize;
|
|
|
return await mediaRepository.GetMediaByLableIdsAsync(request);
|
|
@@ -257,7 +273,7 @@ namespace GxPress.Service.Implement.AppHomePage
|
|
|
foreach (var item in systemLabels)
|
|
|
{
|
|
|
//获取媒体标签
|
|
|
- var mediaIds = await systemLableMediaRepository.GetMediaIdsAsync(item.Id,0);
|
|
|
+ var mediaIds = await systemLableMediaRepository.GetMediaIdsAsync(item.Id, 0);
|
|
|
var medias = await mediaRepository.GetNavigationMediaResults(mediaIds, 1, item.PageSize);
|
|
|
var list = new List<MediaCathedraResult>();
|
|
|
foreach (var mediaModel in medias)
|