123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using ET;
- using FairyGUI;
- using UnityEngine;
- namespace GFGGame
- {
- public class PoemGalleryDataManager : SingletonBase<PoemGalleryDataManager>
- {
- private long _themeOrder = 0;
- /// <summary>
- /// 主题期数
- /// </summary>
- public long ThemeOrder
- {
- get
- {
- return _themeOrder;
- }
- set
- {
- _themeOrder = value;
- }
- }
- private long _themeId = 1;
- /// <summary>
- /// 主题配置id
- /// </summary>
- public long ThemeId
- {
- get
- {
- return _themeId;
- }
- set
- {
- _themeId = value;
- }
- }
- private long _myRank = 0;
- /// <summary>
- /// 我的最高排行
- /// </summary>
- public long MyRank
- {
- get
- {
- return _myRank;
- }
- set
- {
- _myRank = value;
- }
- }
- private long _voteCount = 0;
- /// <summary>
- /// 我的最高排行
- /// </summary>
- public long VoteCount
- {
- get
- {
- return _voteCount;
- }
- set
- {
- _voteCount = value;
- }
- }
- /// <summary>
- /// 推荐数据
- /// </summary>
- public List<PoemGalleryData> RecommendDatas = new List<PoemGalleryData>();
- /// <summary>
- /// 最新数据
- /// </summary>
- public List<PoemGalleryData> NewestDatas = new List<PoemGalleryData>();
- /// <summary>
- /// 好友数据
- /// </summary>
- public List<PoemGalleryData> FrinedDatas = new List<PoemGalleryData>();
- /// <summary>
- /// 收藏数据
- /// </summary>
- public List<PoemGalleryData> FavoriteDatas = new List<PoemGalleryData>();
- /// <summary>
- /// 我的作品数据
- /// </summary>
- public List<PoemGalleryData> MySelfDatas = new List<PoemGalleryData>();
- /// <summary>
- /// 排行榜数据
- /// </summary>
- public List<PoemGalleryData> RankDatas = new List<PoemGalleryData>();
- public void Clear()
- {
- RecommendDatas.Clear();
- FrinedDatas.Clear();
- FavoriteDatas.Clear();
- MySelfDatas.Clear();
- RankDatas.Clear();
- }
- public string GetThemeTime()
- {
- long monday = TimeUtil.GetCurWeekMondayTime(GlobalCfgArray.globalCfg.refreshTime);//本周一5点
- long startTime = 0;
- long endTime = 0;
- if ((TimeInfo.Instance.ServerNow() / 1000) < monday)//本周一5点之前显示上周
- {
- startTime = TimeUtil.GetLastWeekMondayTime(GlobalCfgArray.globalCfg.refreshTime);
- endTime = TimeUtil.GetLastWeekSundayTime("23:59:59");
- }
- else
- {
- startTime = monday * 1000;
- endTime = TimeUtil.GetCurWeekSundayTime("23:59:59") * 1000; ;
- }
- string strStartTime = TimeUtil.FormattingTime3(startTime);
- string strEndTime = TimeUtil.FormattingTime3(endTime); ;
- return string.Format("截止日期:{0}至{1}", strStartTime, strEndTime);
- }
- }
- }
|