1
This commit is contained in:
parent
da5663c9b2
commit
d023956d7e
@ -89,13 +89,12 @@ class SeasonController extends BaseAuthedController {
|
|||||||
'rank_name' => $rankMeta['rank_name'],
|
'rank_name' => $rankMeta['rank_name'],
|
||||||
'score' => $this->userInfo['score'],
|
'score' => $this->userInfo['score'],
|
||||||
'next_score' => $nextRankMeta['rank_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)
|
'season_reward' => Season::seasonReward($rankMeta)
|
||||||
);
|
);
|
||||||
|
|
||||||
//过滤条件
|
// $rank_param = getReqVal('rank',$this->userInfo['rank']);
|
||||||
$rank_param = getReqVal('rank',$this->userInfo['rank']);
|
$users = User::orderBy(User::getUserByRank($this->userInfo['rank']));
|
||||||
$users = User::orderBy(User::getUserByRank($rank_param));
|
|
||||||
$season_rank = array();
|
$season_rank = array();
|
||||||
if (count($users)>0){
|
if (count($users)>0){
|
||||||
foreach ($users as $k=>$user){
|
foreach ($users as $k=>$user){
|
||||||
@ -111,6 +110,26 @@ class SeasonController extends BaseAuthedController {
|
|||||||
// print_r($info);
|
// 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()
|
public function getMissionReward()
|
||||||
{
|
{
|
||||||
$mission = $this->getMissionInfo();
|
$mission = $this->getMissionInfo();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user