Commit 261cf160 by libai

测试

parent a9518c61
Showing with 26 additions and 6 deletions
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
input[type="button"],button{
-webkit-appearance: none;
}
.cs-box{ .cs-box{
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -183,6 +186,18 @@ ...@@ -183,6 +186,18 @@
-webkit-transform: translate(0, -50%); -webkit-transform: translate(0, -50%);
transform: translate(0, -50%); transform: translate(0, -50%);
} }
.copyright{
width: 100%;
height:1rem;
line-height: 1rem;
background-color:gainsboro;
flex: 0 0 auto;
display: flex;
position: relative;
text-align: center;
font-size: 10px;
color:#353535;
}
.system{ .system{
text-align: center; text-align: center;
color:gray; color:gray;
...@@ -246,6 +261,9 @@ ...@@ -246,6 +261,9 @@
</div> </div>
<div class="tips" id="tips" hidden="hidden">测试</div> <div class="tips" id="tips" hidden="hidden">测试</div>
</div> </div>
<div class="copyright">
</div>
<input type="text" hidden="hidden" id="guestid"> <input type="text" hidden="hidden" id="guestid">
</div> </div>
<script> <script>
...@@ -266,7 +284,7 @@ ...@@ -266,7 +284,7 @@
if(null==guestid||guestid==''){ if(null==guestid||guestid==''){
//连接客服 //连接客服
system('正在转接客服,请稍等'); system('正在转接客服,请稍等');
connect(); connect(false);
} }
}); });
} }
...@@ -285,13 +303,13 @@ ...@@ -285,13 +303,13 @@
if(null==guestid||guestid==''){ if(null==guestid||guestid==''){
//连接客服 //连接客服
system('正在转接客服,请稍等'); system('正在转接客服,请稍等');
connect(); connect(true);
}else{ }else{
send(content,2001) send(content,2001)
} }
} }
function connect(){ function connect(send){
var guestid=getCookie('cs-guestid'); var guestid=getCookie('cs-guestid');
$.ajax({ $.ajax({
url:server+"/guest/service", url:server+"/guest/service",
...@@ -317,7 +335,7 @@ ...@@ -317,7 +335,7 @@
if(data.more){ if(data.more){
$("#cs-chat").prepend('<div class="funbtn" onclick="more()">更早的聊天</div>'); $("#cs-chat").prepend('<div class="funbtn" onclick="more()">更早的聊天</div>');
} }
WebSocketStart(guestid); WebSocketStart(guestid,send);
}else{ }else{
system("连接失败("+data.code+")"); system("连接失败("+data.code+")");
} }
...@@ -422,7 +440,7 @@ ...@@ -422,7 +440,7 @@
} }
function WebSocketStart(guestid) { function WebSocketStart(guestid,send) {
state("连接中"); state("连接中");
if(ws!=null&&ws.readyState == WebSocket.OPEN){ if(ws!=null&&ws.readyState == WebSocket.OPEN){
system("The socket is opening,please close first!"); system("The socket is opening,please close first!");
...@@ -442,7 +460,9 @@ ...@@ -442,7 +460,9 @@
{ {
state("连接成功"); state("连接成功");
system("客服已接入"); system("客服已接入");
sendmsg(); if(send){
sendmsg();
}
checkTimer=setInterval("check()",60000); checkTimer=setInterval("check()",60000);
}; };
ws.onmessage = function (evt) ws.onmessage = function (evt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment