修复bug

This commit is contained in:
Dragon
2024-03-04 14:44:11 +08:00
parent a378783cdc
commit a033d971cb
3 changed files with 9 additions and 6 deletions

View File

@@ -74,10 +74,10 @@ function getRank () {
top3.push(...arr)
}
top3.forEach((res, i) => {
$(`.page2 .top3Box .no${i} .tx`).attr('src', res.avatar);
$(`.page2 .top3Box .no${i} .name`).text(res.nick);
$(`.page2 .top3Box .no${i} p`).text(`${rankType == 2 ? "守護值" : "女神值"}`);
$(`.page2 .top3Box .no${i} .score`).text(unitProcessing(res.score, 10000, 1, 'w'));
$(`.page2 .top3Box .no${i + 1} .tx`).attr('src', res.avatar);
$(`.page2 .top3Box .no${i + 1} .name`).text(res.nick);
$(`.page2 .top3Box .no${i + 1} p`).text(`${rankType == 2 ? "守護值" : "女神值"}`);
$(`.page2 .top3Box .no${i + 1} .score`).text(unitProcessing(res.score, 10000, 1, 'w'));
})
// 非前三
$('.page2 ul li').remove();
@@ -92,6 +92,7 @@ function getRank () {
</li>
`
})
console.log(str);
$('.page2 ul li').append(str);
// 處理自己榜單
$('.page2 .my .num').text(res.data.meRank.ranking == 0 ? '未上榜' : res.data.meRank.ranking);