解决token刷新碰撞问题

This commit is contained in:
bob
2024-09-13 23:51:21 +08:00
parent a2ec6d4648
commit 6cb758b9a3

View File

@@ -19,8 +19,10 @@ const myCardDialog = ref()
const myAvatar = ref()
const userData = userStore()
onMounted(() => {
wsConnect.createWs()
onMounted(async () => {
setTimeout(() => {
wsConnect.createWs()
}, 3000) // 延迟启动防止token刷新碰撞
document.addEventListener('click', clickListener)
})