1
This commit is contained in:
parent
25b836342c
commit
b50f879ce5
@ -209,6 +209,7 @@ class CircuitRankingService extends BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sortRows = myself()->arraySort($data, 'cumulative_score', 'desc');
|
$sortRows = myself()->arraySort($data, 'cumulative_score', 'desc');
|
||||||
|
$sortRows = self::toArray($sortRows);
|
||||||
/*
|
/*
|
||||||
{
|
{
|
||||||
if (SERVER_ENV != _ONLINE) {
|
if (SERVER_ENV != _ONLINE) {
|
||||||
@ -232,6 +233,7 @@ class CircuitRankingService extends BaseService {
|
|||||||
//21-100之间的名次 塞入35名
|
//21-100之间的名次 塞入35名
|
||||||
//101-200之间的名次 塞入40名
|
//101-200之间的名次 塞入40名
|
||||||
$sortAndroids = myself()->arraySort($androids, 'cumulative_score', 'desc');
|
$sortAndroids = myself()->arraySort($androids, 'cumulative_score', 'desc');
|
||||||
|
$sortAndroids = self::toArray($sortAndroids);
|
||||||
$lastScore = $maxScore;
|
$lastScore = $maxScore;
|
||||||
for ($i = 0; $i < 75; ++$i) {
|
for ($i = 0; $i < 75; ++$i) {
|
||||||
if (20 + $i > count($sortRows)) {
|
if (20 + $i > count($sortRows)) {
|
||||||
@ -317,4 +319,13 @@ class CircuitRankingService extends BaseService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static function toArray($data)
|
||||||
|
{
|
||||||
|
$arr = array();
|
||||||
|
foreach ($data as $k=>$row){
|
||||||
|
array_push($arr, $v);
|
||||||
|
}
|
||||||
|
return $arr;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user