PoemGalleryDataManager.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using ET;
  5. using FairyGUI;
  6. using UnityEngine;
  7. namespace GFGGame
  8. {
  9. public class PoemGalleryDataManager : SingletonBase<PoemGalleryDataManager>
  10. {
  11. private long _themeOrder = 0;
  12. /// <summary>
  13. /// 主题期数
  14. /// </summary>
  15. public long ThemeOrder
  16. {
  17. get
  18. {
  19. return _themeOrder;
  20. }
  21. set
  22. {
  23. _themeOrder = value;
  24. }
  25. }
  26. private long _themeId = 1;
  27. /// <summary>
  28. /// 主题配置id
  29. /// </summary>
  30. public long ThemeId
  31. {
  32. get
  33. {
  34. return _themeId;
  35. }
  36. set
  37. {
  38. _themeId = value;
  39. }
  40. }
  41. private long _myRank = 0;
  42. /// <summary>
  43. /// 我的最高排行
  44. /// </summary>
  45. public long MyRank
  46. {
  47. get
  48. {
  49. return _myRank;
  50. }
  51. set
  52. {
  53. _myRank = value;
  54. }
  55. }
  56. private long _voteCount = 0;
  57. /// <summary>
  58. /// 我的最高排行
  59. /// </summary>
  60. public long VoteCount
  61. {
  62. get
  63. {
  64. return _voteCount;
  65. }
  66. set
  67. {
  68. _voteCount = value;
  69. }
  70. }
  71. /// <summary>
  72. /// 推荐数据
  73. /// </summary>
  74. public List<PoemGalleryData> RecommendDatas = new List<PoemGalleryData>();
  75. /// <summary>
  76. /// 最新数据
  77. /// </summary>
  78. public List<PoemGalleryData> NewestDatas = new List<PoemGalleryData>();
  79. /// <summary>
  80. /// 好友数据
  81. /// </summary>
  82. public List<PoemGalleryData> FrinedDatas = new List<PoemGalleryData>();
  83. /// <summary>
  84. /// 收藏数据
  85. /// </summary>
  86. public List<PoemGalleryData> FavoriteDatas = new List<PoemGalleryData>();
  87. /// <summary>
  88. /// 我的作品数据
  89. /// </summary>
  90. public List<PoemGalleryData> MySelfDatas = new List<PoemGalleryData>();
  91. /// <summary>
  92. /// 排行榜数据
  93. /// </summary>
  94. public List<PoemGalleryData> RankDatas = new List<PoemGalleryData>();
  95. public void Clear()
  96. {
  97. RecommendDatas.Clear();
  98. FrinedDatas.Clear();
  99. FavoriteDatas.Clear();
  100. MySelfDatas.Clear();
  101. RankDatas.Clear();
  102. }
  103. public string GetThemeTime()
  104. {
  105. long monday = TimeUtil.GetCurWeekMondayTime(GlobalCfgArray.globalCfg.refreshTime);//本周一5点
  106. long startTime = 0;
  107. long endTime = 0;
  108. if ((TimeInfo.Instance.ServerNow() / 1000) < monday)//本周一5点之前显示上周
  109. {
  110. startTime = TimeUtil.GetLastWeekMondayTime(GlobalCfgArray.globalCfg.refreshTime);
  111. endTime = TimeUtil.GetLastWeekSundayTime("23:59:59");
  112. }
  113. else
  114. {
  115. startTime = monday * 1000;
  116. endTime = TimeUtil.GetCurWeekSundayTime("23:59:59") * 1000; ;
  117. }
  118. string strStartTime = TimeUtil.FormattingTime3(startTime);
  119. string strEndTime = TimeUtil.FormattingTime3(endTime); ;
  120. return string.Format("截止日期:{0}至{1}", strStartTime, strEndTime);
  121. }
  122. }
  123. }