fix: ai对话,公共连接关闭被路由到登录页面

This commit is contained in:
shaohuzhang1 2024-02-27 17:58:13 +08:00
parent 853b542abb
commit 298f638234
2 changed files with 9 additions and 5 deletions

View File

@ -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
}

View File

@ -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')) {