Skip to content

Commit ed76824

Browse files
committed
fix: 在管理员登录时初始化agent存储 #552
1 parent 06f8ec4 commit ed76824

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

web/src/views/HomeView.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ const goToChat = async () => {
210210
// 根据用户角色进行跳转
211211
if (userStore.isAdmin) {
212212
// 管理员用户跳转到聊天页面
213+
await agentStore.initialize()
213214
router.push('/agent')
214215
return
215216
}

web/src/views/LoginView.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ const handleLogin = async () => {
401401
if (redirectPath === '/') {
402402
// 如果是管理员,直接跳转到/chat页面
403403
if (userStore.isAdmin) {
404+
await agentStore.initialize()
404405
router.push('/agent')
405406
return
406407
}

0 commit comments

Comments
 (0)