...
This commit is contained in:
parent
548c6bd64b
commit
a24bfa8fc8
@ -140,7 +140,14 @@ console.log("season ranking start1");
|
|||||||
if (element.score>0) {
|
if (element.score>0) {
|
||||||
sorted.push(element);
|
sorted.push(element);
|
||||||
sorted.sort(function(a,b) {
|
sorted.sort(function(a,b) {
|
||||||
return b.score - a.score;
|
let r = b.score - a.score;
|
||||||
|
if (r==0) {
|
||||||
|
r = a.score_modifytime - b.score_modifytime;
|
||||||
|
}
|
||||||
|
if (r==0) {
|
||||||
|
r = a.idx - b.idx;
|
||||||
|
}
|
||||||
|
return r;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -563,16 +563,21 @@ class MarketController extends BaseController {
|
|||||||
|
|
||||||
$total = count($rows);
|
$total = count($rows);
|
||||||
$page_end = $start + $page_size;
|
$page_end = $start + $page_size;
|
||||||
if ($page_end > $total)
|
if ($page_end > $total) {
|
||||||
$page_end = $total;
|
$page_end = $total;
|
||||||
|
$start = $total-1;
|
||||||
|
$start = intval($start / $page_size) * $page_size;
|
||||||
|
if ($start<0) $start = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$nfts = array();
|
$nfts = array();
|
||||||
for ($x = $start; $x < $page_end; $x++) {
|
for ($x = $start; $x < $page_end; $x++) {
|
||||||
$row = $rows[$x];
|
$row = $rows[$x];
|
||||||
$nftDb = Nft::getNft($row['token_id']);
|
$nftDb = Nft::getNft($row['token_id']);
|
||||||
// if (!$nftDb) {
|
if (!$nftDb) {
|
||||||
// myself()->_rspErr(1, 'nft not exists');
|
myself()->_rspErr(1, 'nft not exists');
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
$nft = Nft::toDto($nftDb);
|
$nft = Nft::toDto($nftDb);
|
||||||
|
|
||||||
$t = $row['token_type'];
|
$t = $row['token_type'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user