1
This commit is contained in:
parent
79aae72bf9
commit
e49923b9b7
@ -40,10 +40,14 @@ class OutAppCircuitController extends BaseController {
|
||||
if (SERVER_ENV != _ONLINE) {
|
||||
$user = User::find('2_2006_I75DCdyQRllgGRYvT0wcGtPR9gbDUZws');
|
||||
}
|
||||
$info = array(
|
||||
'star_time' => strtotime($currentCircuitMeta['start_time']),
|
||||
'end_time' => strtotime($currentCircuitMeta['end_time']),
|
||||
'ranking' => 0,
|
||||
'score' => 0,
|
||||
);
|
||||
if (!$user){
|
||||
myself()->_rspErr(1, 'user not found');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
$redis = $this->_getRedis($this->redis_key_circuit_ranking);
|
||||
if (! $redis->exists(CIRCUIT_RANKING_KEY.$this->redis_key_circuit_ranking)){
|
||||
$rows = Circuit::getCircuitList($currentCircuitMeta['circuit_season']);
|
||||
@ -62,6 +66,7 @@ class OutAppCircuitController extends BaseController {
|
||||
'ranking' => $myInfo['ranking'],
|
||||
'score' => $myInfo['score'],
|
||||
);
|
||||
}
|
||||
$this->_rspData(array(
|
||||
'rank_list' => $list,
|
||||
'info' => $info,
|
||||
@ -86,9 +91,13 @@ class OutAppCircuitController extends BaseController {
|
||||
$user = User::find('2_2006_I75DCdyQRllgGRYvT0wcGtPR9gbDUZws');
|
||||
}
|
||||
if (!$user){
|
||||
myself()->_rspErr(1, 'user not found');
|
||||
return;
|
||||
}
|
||||
$info = array(
|
||||
'star_time' => strtotime($currentStageMeta['start_time']),
|
||||
'end_time' => strtotime($currentStageMeta['end_time']),
|
||||
'ranking' => 0,
|
||||
'score' => 0
|
||||
);
|
||||
} else {
|
||||
$currentStageMeta = mt\CircuitTime::getCurrentStage();
|
||||
if (!$currentStageMeta){
|
||||
$currentStageMeta = mt\CircuitTime::getPrevStage();
|
||||
@ -111,6 +120,7 @@ class OutAppCircuitController extends BaseController {
|
||||
'ranking' => $myInfo['ranking'],
|
||||
'score' => $myInfo['score'],
|
||||
);
|
||||
}
|
||||
$this->_rspData(array(
|
||||
'rank_list' => $list,
|
||||
'info' => $info,
|
||||
|
Loading…
x
Reference in New Issue
Block a user