李昊 4 years ago
parent
commit
c031405b71

+ 2 - 0
gx_api/GxPress/Api/GxPress.Api/AppControllers/AppPageController.cs

@@ -84,6 +84,7 @@ namespace GxPress.Api.AppControllers
         /// </summary>
         /// <returns></returns>
         [HttpPost("lable")]
+         [AllowAnonymous]
         public async Task<PagedList<MediaCathedraResult>> GetMediaByLableIdsAsync(MediaIdsRequest request)
         {
             return await appHomePageService.GetMediaByLableIdsAsync(request);
@@ -94,6 +95,7 @@ namespace GxPress.Api.AppControllers
         /// <param name="request"></param>
         /// <returns></returns>
         [HttpPost("teacher")]
+         [AllowAnonymous]
         public async Task<PagedList<TeacherResult>> GetTeacherAsync(TeacherRequest request)
         {
             return await appHomePageService.GetTeacherAsync(request);

+ 1 - 1
gx_api/GxPress/Repository/GxPress.Repository.Implement/Teacher/TeacherRepository.cs

@@ -105,7 +105,7 @@ namespace GxPress.Repository.Implement.Teacher
             query.Select(nameof(Entity.tede2.Teacher.Teacher.CollectCount));
             result.Total = await _repository.CountAsync(query);
             query.OrderByDesc(nameof(Entity.tede2.Teacher.Teacher.Sort));
-            query.ForPage(request.PerPage, request.PerPage);
+            query.ForPage(request.Page, request.PerPage);
             result.Items = await _repository.GetAllAsync<TeacherResult>(query);
             foreach (var item in result.Items)
             {