修改字段

This commit is contained in:
Dragon
2024-02-05 21:05:23 +08:00
parent 2d917ebbc3
commit 3c195a0f6b

View File

@@ -73,7 +73,7 @@ function getRank () {
top3.forEach((res, index) => {
$(`.page2 .box .topBox .top${index + 1} .tx`).attr('src', res.avatar);
$(`.page2 .box .topBox .top${index + 1} .name`).text(res.nick);
$(`.page2 .box .topBox .top${index + 1} .score`).text(`${rankType == 2 || rankType == 4 ? "财气值:" : "福气值:"}${unitProcessing(res.score, 10000, 1, 'w')}`);
$(`.page2 .box .topBox .top${index + 1} .score`).text(`${rankType == 2 ? "财气值:" : "福气值:"}${unitProcessing(res.score, 10000, 1, 'w')}`);
})
// 处理非前三
var str = '';
@@ -84,7 +84,7 @@ function getRank () {
<div class="num">${res.ranking}</div>
<img src="${res.avatar}" alt="" class="tx">
<div class="name">${res.nick}</div>
<div class="score">${rankType == 2 || rankType == 4 ? "财气值:" : "福气值:"}${unitProcessing(res.score, 10000, 1, 'w')}</div>
<div class="score">${rankType == 2 ? "财气值:" : "福气值:"}${unitProcessing(res.score, 10000, 1, 'w')}</div>
</li>
`
})
@@ -93,7 +93,7 @@ function getRank () {
$('.page2 .box .my .tx').attr('src', res.data.meRank.avatar);
$('.page2 .box .my .num').text(res.data.meRank.ranking == 0 ? '未上榜' : res.data.meRank.ranking);
$('.page2 .box .my .name').text(res.data.meRank.nick);
$('.page2 .box .my .score').text(`${rankType == 2 || rankType == 4 ? "财气值:" : "福气值:"}${unitProcessing(res.data.meRank.score, 10000, 1, 'w')}`);
$('.page2 .box .my .score').text(`${rankType == 2 ? "财气值:" : "福气值:"}${unitProcessing(res.data.meRank.score, 10000, 1, 'w')}`);
} else {
toastMsg(res.message)
}