修复榜单异常问题

This commit is contained in:
dragon
2024-06-21 17:07:23 +08:00
parent 87a93326b9
commit 03dd7e47a6
3 changed files with 10 additions and 15 deletions

View File

@@ -178,7 +178,7 @@ function getRecord() {
success(res) {
if (res.code === 200) {
var str = '';
if (res.data.length == 0 && pageNumPk == 1) {
if (res.data.length == 0) {
lockPk = false;
} else {
res.data.forEach((res, i) => {

View File

@@ -59,5 +59,5 @@
<script src="./local/en.js"></script>
<script src="./local/zh.js"></script>
<script src="./local/ar.js"></script>
<script src="./js/hourRankLicense.js"></script>
<script src="./js/hourRankLicense.js?v=1.0"></script>
<script src="../../common/local/langHandler.js"></script>

View File

@@ -88,9 +88,6 @@ const renderLastHourThree = () => {
}
let str = ''
lastHourRank.map((item, index) => {
if (item.score > 10000) {
item.score = (Math.floor(item.score / 1000)) / 10 + 'W'
}
str += `
<div class="top_three_item">
<div class="avatar" data-uid=${item.uid}>
@@ -101,7 +98,7 @@ const renderLastHourThree = () => {
<div class="num" style="display:${item.score === '' ? 'none' : 'block'}">
${index == 0 ?
'<img src="./images/single/first-icon.png" alt=""></img>' :
`<span>${item.score}</span><br>${langReplace(localLang.demoModule.hour_text8)}`
`<span>${unitProcessingAr(item.score,1)}</span><br>${langReplace(localLang.demoModule.hour_text8)}`
}
</div>
</div>
@@ -156,9 +153,6 @@ const renderCurrentList = () => {
}
let str = ''
currHourRank.map((item, index) => {
if (item.score > 10000) {
item.score = (Math.floor(item.score / 1000)) / 10 + 'W'
}
str += `
<li>
<div class="index">${index + 1}</div>
@@ -169,7 +163,7 @@ const renderCurrentList = () => {
<div class="others_num" style="display:${item.score === '' ? 'none' : 'block'}">
${index === 0 ?
`${langReplace(localLang.demoModule.hour_text10)}` :
`${langReplace(localLang.demoModule.hour_text8)}<br><span>${item.score}</span>`
`${langReplace(localLang.demoModule.hour_text8)}<br><span>${unitProcessingAr(item.score,1)}</span>`
}
</div>
</li>
@@ -184,11 +178,12 @@ const renderCurrentRoomInfo = () => {
currHourRank.forEach((item, index) => {
if (item.uid == currRoomInfo.uid) {
rank = index + 1
if (item.score > 10000) {
score = (Math.floor(item.score / 1000)) / 10 + 'W'
} else {
score = item.score
}
// if (item.score > 10000) {
// score = (Math.floor(item.score / 1000)) / 10 + 'W'
// } else {
// score = item.score
// }
score = unitProcessingAr(item.score,1)
}
})
$('.mine_index').html(rank ? rank : `${langReplace(localLang.demoModule.hour_text11)}`)