perf: cas auth (#3436)

This commit is contained in:
shaohuzhang1 2025-06-30 18:34:59 +08:00 committed by GitHub
parent 305cdea34b
commit bd75a3d5bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,7 +44,7 @@ router.beforeEach(
}
const p_token = to.query.token
if (p_token) {
chatUser.setToken(p_token)
chatUser.setToken(p_token as string)
}
const token = chatUser.getToken()
if (authentication) {
@ -75,7 +75,12 @@ router.beforeEach(
}
return
}
next()
if (p_token) {
next({ ...to, query: {} })
} else {
next()
}
return
}
}