小时榜:获取语言方法修改

This commit is contained in:
qf
2023-05-26 19:50:25 +08:00
parent 56ccb723c6
commit bcc0112c9a
2 changed files with 5 additions and 5 deletions

View File

@@ -152,6 +152,8 @@ const countDown = () => {
// 渲染小时榜当前列表
const renderCurrentList = () => {
currHourRank = currHourRank.slice(0, 10)
const langReplace = window.lang.replace;
const localLang = window.lang;
if (currHourRank.length < 10) {
let len = 10 - currHourRank.length
let arr = new Array(len).fill({
@@ -162,8 +164,6 @@ const renderCurrentList = () => {
}
let str = ''
currHourRank.map((item, index) => {
const langReplace = window.lang.replace;
const localLang = window.lang;
if (item.score > 10000) {
item.score = (Math.floor(item.score / 1000)) / 10 + 'W'
}

View File

@@ -151,6 +151,8 @@ const countDown = () => {
}
// 渲染小时榜当前列表
const renderCurrentList = () => {
const langReplace = window.lang.replace;
const localLang = window.lang;
currHourRank = currHourRank.slice(0, 10)
if (currHourRank.length < 10) {
let len = 10 - currHourRank.length
@@ -162,8 +164,6 @@ const renderCurrentList = () => {
}
let str = ''
currHourRank.map((item, index) => {
const langReplace = window.lang.replace;
const localLang = window.lang;
if (item.score > 10000) {
item.score = (Math.floor(item.score / 1000)) / 10 + 'W'
}
@@ -188,7 +188,7 @@ const renderCurrentList = () => {
// 渲染当前房间榜单信息
const renderCurrentRoomInfo = () => {
const langReplace = window.lang.replace;
const localLang = window.lang;
const localLang = window.lang;
let rank = ''
let score = ''
currHourRank.forEach((item, index) => {