mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-03-03 10:30:47 +08:00
fix: 修改当前在线人数icon
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
<ToolTip v-if="!isMobile" content="当前在线人数" placement="bottom">
|
||||
<div class="online-count">
|
||||
<i class="fas fa-people-group"></i>
|
||||
<peoples-two />
|
||||
<span>{{ onlineCount }}</span>
|
||||
</div>
|
||||
</ToolTip>
|
||||
@@ -143,7 +143,7 @@ async function sendPing() {
|
||||
method: 'POST',
|
||||
})
|
||||
} catch (e) {
|
||||
console.error("心跳失败", e)
|
||||
console.error('心跳失败', e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,11 +155,10 @@ async function fetchCount() {
|
||||
})
|
||||
onlineCount.value = await res.json()
|
||||
} catch (e) {
|
||||
console.error("获取在线人数失败", e)
|
||||
console.error('获取在线人数失败', e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const search = () => {
|
||||
showSearch.value = true
|
||||
nextTick(() => {
|
||||
@@ -311,8 +310,8 @@ onMounted(async () => {
|
||||
// 新增的在线人数逻辑
|
||||
sendPing()
|
||||
fetchCount()
|
||||
setInterval(sendPing, 120000) // 每 2 分钟发一次心跳
|
||||
setInterval(fetchCount, 60000) // 每 1 分更新 UI
|
||||
setInterval(sendPing, 120000) // 每 2 分钟发一次心跳
|
||||
setInterval(fetchCount, 60000) // 每 1 分更新 UI
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user