fix: ai对话,公共连接关闭被路由到登录页面
This commit is contained in:
parent
853b542abb
commit
298f638234
@ -83,11 +83,11 @@ function embedChatbot() {
|
|||||||
if(is_404){
|
if(is_404){
|
||||||
document.body.removeChild(chat_container)
|
document.body.removeChild(chat_container)
|
||||||
document.body.append(chat_container)
|
document.body.append(chat_container)
|
||||||
|
|
||||||
is_404=false
|
is_404=false
|
||||||
}else{
|
}
|
||||||
chat_container.style['display']='block'
|
chat_container.style['display']='block'
|
||||||
}
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
is_404=true
|
is_404=true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,7 +56,11 @@ instance.interceptors.response.use(
|
|||||||
router.push('/404 ')
|
router.push('/404 ')
|
||||||
}
|
}
|
||||||
if (err.response?.status === 401) {
|
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')) {
|
if (err.response?.status === 403 && !err.response.config.url.includes('chat/open')) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user