feat: 优化
parent
0c9fbc14d7
commit
cde17a9434
|
|
@ -1,8 +1,8 @@
|
|||
function auth(token, protocol, host) {
|
||||
const XML = new XMLHttpRequest()
|
||||
XML.open("POST",`${protocol}//${host}/api/application/authentication`,false)
|
||||
XML.setRequestHeader('Content-Type', 'application/json');
|
||||
res=XML.send(JSON.stringify({"access_token":token}))
|
||||
XML.open('POST', `${protocol}//${host}/api/application/authentication`, false)
|
||||
XML.setRequestHeader('Content-Type', 'application/json')
|
||||
res = XML.send(JSON.stringify({ access_token: token }))
|
||||
return XML.status == 200
|
||||
}
|
||||
|
||||
|
|
@ -41,8 +41,7 @@ function embedChatbot() {
|
|||
chat_container = document.createElement('div')
|
||||
chat_container.id = 'chat_container'
|
||||
chat_container.style.cssText = `z-index:10000;position: relative;
|
||||
width: 420px;
|
||||
height: 600px;
|
||||
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--N300, #DEE0E3);
|
||||
background: linear-gradient(188deg, rgba(235, 241, 255, 0.20) 39.6%, rgba(231, 249, 255, 0.20) 94.3%), #EFF0F1;
|
||||
|
|
@ -87,7 +86,6 @@ function embedChatbot() {
|
|||
is_404 = false
|
||||
}
|
||||
chat_container.style['display'] = 'block'
|
||||
|
||||
} else {
|
||||
is_404 = true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -518,3 +518,15 @@ h4 {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#chat_container {
|
||||
width: 420px;
|
||||
height: 600px;
|
||||
}
|
||||
@media only screen and (max-width: 768px) {
|
||||
#chat_container {
|
||||
width: 100%;
|
||||
height: 70%;
|
||||
right: 0 !important;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue