fix: lastfivestar

This commit is contained in:
bietiaop 2024-07-10 15:50:49 +08:00
parent 23e34ef89d
commit b92c557b19

View file

@ -204,9 +204,6 @@ export async function anaylizeGachaLog(uid) {
}
if (i === data.length - 1 && list.length > 0) {
list[list.length - 1]['totalCount'] = i - preIndex;
if (lastFive === null) {
lastFive = data.length;
}
}
i++;
}
@ -223,7 +220,8 @@ export async function anaylizeGachaLog(uid) {
if (upCount > 0) avgUp = ((totalCount - lastFive) / upCount).toFixed(1);
}
if (!lastFive && fiveStars === 0) {
lastFive = '-';
if (totalCount > 0) lastFive = totalCount;
else lastFive = '-';
}
result.push({
name,