mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
fix: ai对话,公共连接关闭被路由到登录页面
This commit is contained in:
parent
853b542abb
commit
298f638234
|
|
@ -83,11 +83,11 @@ function embedChatbot() {
|
|||
if(is_404){
|
||||
document.body.removeChild(chat_container)
|
||||
document.body.append(chat_container)
|
||||
|
||||
is_404=false
|
||||
}else{
|
||||
chat_container.style['display']='block'
|
||||
}
|
||||
|
||||
}
|
||||
chat_container.style['display']='block'
|
||||
|
||||
}else{
|
||||
is_404=true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,11 @@ instance.interceptors.response.use(
|
|||
router.push('/404 ')
|
||||
}
|
||||
if (err.response?.status === 401) {
|
||||
router.push({ name: 'login' })
|
||||
if (err.response.config.url.includes('chat/open')) {
|
||||
router.push('/404 ')
|
||||
} else {
|
||||
router.push({ name: 'login' })
|
||||
}
|
||||
}
|
||||
|
||||
if (err.response?.status === 403 && !err.response.config.url.includes('chat/open')) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue