fix: 在管理员登录时初始化agent存储 #552
This commit is contained in:
parent
06f8ec4d74
commit
ed76824191
@ -210,6 +210,7 @@ const goToChat = async () => {
|
||||
// 根据用户角色进行跳转
|
||||
if (userStore.isAdmin) {
|
||||
// 管理员用户跳转到聊天页面
|
||||
await agentStore.initialize()
|
||||
router.push('/agent')
|
||||
return
|
||||
}
|
||||
|
||||
@ -401,6 +401,7 @@ const handleLogin = async () => {
|
||||
if (redirectPath === '/') {
|
||||
// 如果是管理员,直接跳转到/chat页面
|
||||
if (userStore.isAdmin) {
|
||||
await agentStore.initialize()
|
||||
router.push('/agent')
|
||||
return
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user