fix: chat route (#3276)

This commit is contained in:
shaohuzhang1 2025-06-17 13:50:03 +08:00 committed by GitHub
parent 119f678224
commit 315ee4bc3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,7 +25,7 @@ router.beforeEach(
return
}
const { chatUser } = useStore()
const notAuthRouteNameList = ['UserLogin']
const notAuthRouteNameList = ['user_login']
if (!notAuthRouteNameList.includes(to.name ? to.name.toString() : '')) {
if (to.params && to.params.accessToken) {
chatUser.setAccessToken(to.params.accessToken.toString())
@ -40,7 +40,7 @@ router.beforeEach(
if (authentication) {
if (!token) {
next({
name: 'UserLogin',
name: 'user_login',
params: {
accessToken: to.params.accessToken,
},