diff --git a/webapp/controller/RankingController.class.php b/webapp/controller/RankingController.class.php index 7338f88b..3a1e2a7d 100644 --- a/webapp/controller/RankingController.class.php +++ b/webapp/controller/RankingController.class.php @@ -38,12 +38,18 @@ class RankingController extends BaseAuthedController { }else{ $this->_setV(TN_RANK_STATUS, 1, 0); } + $countdown = 0; + $nextCurrSeasonMeta = mt\RankSeason::getNextCurrentSeason(); + if ($nextCurrSeasonMeta){ + $countdown = strtotime($nextCurrSeasonMeta['start_time']) - myself()->_getNowTime(); + } $rank_status = $this->_getV(TN_RANK_STATUS, 0 ); $is_rank = $this->_getV(TN_RANK_STATUS, 1 ); $this->_rspData(array( 'status' => $rank_status, // 0:常规状态 1:引导初始排位 2:赛季初,需结算上个赛季 - 'is_rank' => $is_rank //赛季是否空挡期 + 'is_rank' => $is_rank, //赛季是否空挡期 1:赛季开始了 0:赛季未开始 + 'countdown' => $countdown //下赛季倒计时 )); } diff --git a/webapp/controller/SignController.class.php b/webapp/controller/SignController.class.php new file mode 100644 index 00000000..e69de29b diff --git a/webapp/models/SignLog.php b/webapp/models/SignLog.php new file mode 100644 index 00000000..b17d2cc9 --- /dev/null +++ b/webapp/models/SignLog.php @@ -0,0 +1,10 @@ + $meta) { + if ($key == 0 && myself()->_getNowTime() <= strtotime($meta['start_time'])) { + return $meta; + } + if ($key > 0 && + myself()->_getNowTime() >= strtotime($metaList[$key-1]['end_time']) && + myself()->_getNowTime() <= strtotime($metaList[$key]['start_time'])) { + return $meta; + } + } + return null; + } + public static function getSeasonByTime($time) { foreach (self::getMetaList() as $meta) { diff --git a/webapp/mt/Sign.php b/webapp/mt/Sign.php new file mode 100644 index 00000000..88c8987a --- /dev/null +++ b/webapp/mt/Sign.php @@ -0,0 +1,10 @@ +