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