diff --git a/src/views/Ranking/Couple/Ranking.vue b/src/views/Ranking/Couple/Ranking.vue index 80bc055..e7ce69d 100644 --- a/src/views/Ranking/Couple/Ranking.vue +++ b/src/views/Ranking/Couple/Ranking.vue @@ -621,15 +621,13 @@ const formatLargeNumber = (num) => { const absNum = Math.abs(num) if (absNum >= 1000000) { - // 截断到两位小数,不进行四舍五入 const millionValue = num / 1000000 - const truncatedValue = Math.trunc(millionValue * 100) / 100 - return truncatedValue.toFixed(2) + 'M' + const roundedValue = Math.round(millionValue * 100) / 100 + return roundedValue.toFixed(2) + 'M' } else if (absNum >= 1000) { - // 截断到两位小数,不进行四舍五入 const thousandValue = num / 1000 - const truncatedValue = Math.trunc(thousandValue * 100) / 100 - return truncatedValue.toFixed(2) + 'K' + const roundedValue = Math.round(thousandValue * 100) / 100 + return roundedValue.toFixed(2) + 'K' } else { return Math.floor(num).toString() }