李昊 hace 4 años
padre
commit
6814ab341f

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

@@ -206,22 +206,13 @@ namespace GxPress.Api.AppControllers
         /// <summary>
         /// 榜单
         /// </summary>
-        /// <param name="request"></param>
         /// <returns></returns>
         [HttpGet("ranking")]
         [AllowAnonymous]
         public async Task<List<MediaRankingResult>> GetRankingListResults()
         {
-            var dictionary = new Dictionary<int, string>();
-            dictionary.Add(2, "热书榜");
-            dictionary.Add(3, "课程榜");
-            dictionary.Add(4, "文献头条");
-            dictionary.Add(6, "试听榜");
-            var dictionaryMedia = new Dictionary<int, string>();
-            dictionaryMedia.Add(AllTypeConst.Book.GetHashCode(), "热书榜");
-            dictionaryMedia.Add(AllTypeConst.Curriculum.GetHashCode(), "课程榜");
-            dictionaryMedia.Add(AllTypeConst.Article.GetHashCode(), "文献头条");
-            dictionaryMedia.Add(AllTypeConst.Audio.GetHashCode(), "试听榜");
+            var dictionary = new Dictionary<int, string>() { { 2, "热书榜" }, { 3, "课程榜" }, { 4, "文献头条" }, { 6, "试听榜" } };
+            var dictionaryMedia = new Dictionary<int, string>() { { AllTypeConst.Book.GetHashCode(), "热书榜" }, { AllTypeConst.Curriculum.GetHashCode(), "课程榜" }, { AllTypeConst.Article.GetHashCode(), "文献头条" }, { AllTypeConst.Audio.GetHashCode(), "试听榜" } };
             var result = new List<MediaRankingResult>();
             foreach (var item in dictionary)
             {