diff --git a/webapp/controller/SeasonController.class.php b/webapp/controller/SeasonController.class.php index 0640b183..d93427b9 100644 --- a/webapp/controller/SeasonController.class.php +++ b/webapp/controller/SeasonController.class.php @@ -89,13 +89,12 @@ class SeasonController extends BaseAuthedController { 'rank_name' => $rankMeta['rank_name'], 'score' => $this->userInfo['score'], 'next_score' => $nextRankMeta['rank_score'], - 'season_end_time' => $this->currRankSeasonMeta['end_time'], + 'season_end_time' => strtotime($this->currRankSeasonMeta['end_time']), 'season_reward' => Season::seasonReward($rankMeta) ); - //过滤条件 - $rank_param = getReqVal('rank',$this->userInfo['rank']); - $users = User::orderBy(User::getUserByRank($rank_param)); +// $rank_param = getReqVal('rank',$this->userInfo['rank']); + $users = User::orderBy(User::getUserByRank($this->userInfo['rank'])); $season_rank = array(); if (count($users)>0){ foreach ($users as $k=>$user){ @@ -111,6 +110,26 @@ class SeasonController extends BaseAuthedController { // print_r($info); } + public function getRankingInfo(){ + $rank_param = getReqVal('rank',0); + if (!$rank_param){ + $this->_rspErr(1, 'params rank error'); + die(); + } + $users = User::orderBy(User::getUserByRank($rank_param)); + $season_rank = array(); + if (count($users)>0){ + foreach ($users as $k=>$user){ + if ($k<20){ + $userDto = User::getUserByRankMess($user); + $userDto['rank_sort'] = $k+1; + array_push($season_rank,$userDto); + } + } + } + $this->_rspData(['info'=>$season_rank]); + } + public function getMissionReward() { $mission = $this->getMissionInfo();