增加下赛季倒计时
This commit is contained in:
parent
78f7fad29f
commit
22f6f43749
@ -38,12 +38,18 @@ class RankingController extends BaseAuthedController {
|
|||||||
}else{
|
}else{
|
||||||
$this->_setV(TN_RANK_STATUS, 1, 0);
|
$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 );
|
$rank_status = $this->_getV(TN_RANK_STATUS, 0 );
|
||||||
$is_rank = $this->_getV(TN_RANK_STATUS, 1 );
|
$is_rank = $this->_getV(TN_RANK_STATUS, 1 );
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'status' => $rank_status, // 0:常规状态 1:引导初始排位 2:赛季初,需结算上个赛季
|
'status' => $rank_status, // 0:常规状态 1:引导初始排位 2:赛季初,需结算上个赛季
|
||||||
'is_rank' => $is_rank //赛季是否空挡期
|
'is_rank' => $is_rank, //赛季是否空挡期 1:赛季开始了 0:赛季未开始
|
||||||
|
'countdown' => $countdown //下赛季倒计时
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
0
webapp/controller/SignController.class.php
Normal file
0
webapp/controller/SignController.class.php
Normal file
10
webapp/models/SignLog.php
Normal file
10
webapp/models/SignLog.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
namespace models;
|
||||||
|
|
||||||
|
|
||||||
|
class SignLog
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
@ -30,6 +30,22 @@ class RankSeason
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getNextCurrentSeason()
|
||||||
|
{
|
||||||
|
$metaList = self::getMetaList();
|
||||||
|
foreach ($metaList as $key => $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)
|
public static function getSeasonByTime($time)
|
||||||
{
|
{
|
||||||
foreach (self::getMetaList() as $meta) {
|
foreach (self::getMetaList() as $meta) {
|
||||||
|
10
webapp/mt/Sign.php
Normal file
10
webapp/mt/Sign.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
namespace mt;
|
||||||
|
|
||||||
|
|
||||||
|
class Sign
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user