修复落后分数异常问题
This commit is contained in:
@@ -211,7 +211,7 @@ function listRank() {
|
||||
</p>
|
||||
<span>ID:${res.erbanNo}</span>
|
||||
</div>
|
||||
<div class="score">${langReplace(localLang.demoModule.text14)}${scoreFun(list, i)}</div>
|
||||
<div class="score">${langReplace(localLang.demoModule.text14)}${scoreFun(list, i, res.score)}</div>
|
||||
</li>
|
||||
`
|
||||
})
|
||||
@@ -317,7 +317,7 @@ $('.page1 .content .more').click(function () {
|
||||
</p>
|
||||
<span>ID:${res.erbanNo}</span>
|
||||
</div>
|
||||
<div class="score">${langReplace(localLang.demoModule.text14)}${scoreFun(arr[page], i)}</div>
|
||||
<div class="score">${langReplace(localLang.demoModule.text14)}${scoreFun(arr[page], i, res.score)}</div>
|
||||
</li>
|
||||
`})
|
||||
$('.page1 .content ul').append(str);
|
||||
@@ -335,12 +335,12 @@ function paginateArray(arr, itemsPerPage) {
|
||||
return result;
|
||||
}
|
||||
// 处理
|
||||
function scoreFun(list, i) {
|
||||
function scoreFun(list, i, myScore) {
|
||||
var num;
|
||||
if (i == 0) {
|
||||
num = unitProcessingAr(list[1].score - list[2].score, 1);
|
||||
if (i <= 0) {
|
||||
num = unitProcessingAr(list[0].score - list[1].score, 1);
|
||||
} else {
|
||||
num = unitProcessingAr(list[i - 1].score - list[i+1].score, 1);
|
||||
num = unitProcessingAr(list[i].score - myScore, 1);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
Reference in New Issue
Block a user