缓存key修改

pull/23/head
taoshihan1991 4 years ago
parent e5b76d24fa
commit 361bee3d3e

@ -248,7 +248,7 @@
width: 100%;
text-align: left;
position: relative;
margin-bottom: 86px;
margin-bottom: 105px;
}
.chatBox{
/*max-height: 600px;*/
@ -304,8 +304,10 @@
}
.chatTitle{height: 30px;line-height: 30px;color: #1989fa}
.chatBoxSend{background: #f5f5f5;position: fixed;bottom: 0px;width: 100%;height: 86px;max-width: 800px;}
.chatBoxSend{background: #f5f5f5;position: fixed;bottom: 0px;width: 100%;height: 105px;max-width: 800px;}
.chatBoxSendBtn{float: right;margin: 12px 4px 0 0;}
.footContact{text-align: center;}
.footContact a{font-size: 12px;color: #999;text-decoration: none;}
.chatTime{text-align: center;color: #bbb;margin: 5px 0;font-size: 12px;}
.chatTimeHide{display: none;}
.clear{clear:both;}

@ -12,7 +12,7 @@
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="/static/css/common.css?v=0.1.2" />
<link rel="stylesheet" href="/static/css/common.css?v=0.1.3" />
<style>
html,
body {
@ -66,7 +66,9 @@
<div class="btnArea">
<el-button type="primary" class="chatBoxSendBtn" size="small" v-on:click="chatToUser">{{.SendBtn}}</el-button>
</div>
<div class="clear"></div>
<div class="footContact clear">
<a href="https://github.com/taoshihan1991/go-fly" target="_blank">GO-FLY客服陶士涵提供技术支持</a>
</div>
</div>
<!--//客服代码-->
</template>
@ -78,5 +80,5 @@
var KEFU_ID='{{.KEFU_ID}}';
var REFER='{{.Refer}}';
</script>
<script src="/static/js/chat-page.js?v=0.1.2"></script>
<script src="/static/js/chat-page.js?v=0.1.3"></script>
</html>

@ -1,9 +1,3 @@
// var guest={};
// guest.id = "";
// guest.name = typeof(returnCitySN)!="undefined" ?returnCitySN["cname"]+"网友":"匿名";
// guest.avator = "/static/images/"+Math.floor(Math.random()*(14-0+1)+0)+".jpg";
// guest.group = "1";
// guest.to_id=KEFU_ID!=""? KEFU_ID:"kefu2";
KEFU_ID=KEFU_ID!=""? KEFU_ID:"kefu2";
new Vue({
el: '#app',
@ -73,13 +67,6 @@ new Vue({
},
//发送给客户
chatToUser() {
// if(guest.to_id==""){
// this.$message({
// message: '暂时没有客服接手',
// type: 'warning'
// });
// return;
// }
this.messageContent=this.messageContent.trim("\r\n");
if(this.messageContent==""||this.messageContent=="\r\n"){
this.$message({
@ -123,7 +110,7 @@ new Vue({
},
//获取当前用户信息
getUserInfo(){
let obj=this.getCache("guest");
let obj=this.getCache("visitor");
if(!obj){
let _this=this;
//发送消息
@ -136,7 +123,7 @@ new Vue({
return;
}
_this.visitor=res.result;
_this.setCache("guest",res.result);
_this.setCache("visitor",res.result);
_this.initConn();
});
}else{
@ -264,7 +251,7 @@ new Vue({
if(_this.socket!=null){
_this.socket.send(JSON.stringify(mes));
}
},5000);
},30000);
},
//初始化
init(){

Loading…
Cancel
Save