From b4bb3e6381a00ac2b481e227443b30286bfdd565 Mon Sep 17 00:00:00 2001
From: taoshihan1991 <630892807@qq.com>
Date: Wed, 13 Jan 2021 11:26:48 +0800
Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=8F=90=E7=A4=BA=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
static/js/chat-page.js | 2 +-
static/js/gofly-front.js | 21 ++++++++++-----------
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/static/js/chat-page.js b/static/js/chat-page.js
index 3bb9f99..849dc2b 100644
--- a/static/js/chat-page.js
+++ b/static/js/chat-page.js
@@ -84,7 +84,7 @@ new Vue({
this.socket.close();
this.socketClosed=true;
}
- //window.parent.postMessage(redata);
+ window.parent.postMessage(redata);
},
//发送给客户
chatToUser:function() {
diff --git a/static/js/gofly-front.js b/static/js/gofly-front.js
index 2448562..1bbe48c 100644
--- a/static/js/gofly-front.js
+++ b/static/js/gofly-front.js
@@ -42,6 +42,7 @@ GOFLY.init=function(config){
});
window.onfocus = function () {
clearTimeout(this.titleTimer);
+ console.log(1);
document.title = _this.originTitle;
};
}
@@ -78,10 +79,7 @@ GOFLY.clickBtn=function (){
'
您好:
极简强大的开源免费Go语言在线客服单页营销系统,来了解一下?
' +
'';
$('body').append(html);
- $("#launchButton").on("click",function() {
- _this.showKefu();
- });
- $("#launchButtonNotice").on("click",function() {
+ $(".launchButtonBox").on("click",function() {
_this.showKefu();
});
setTimeout(function(){
@@ -126,15 +124,16 @@ GOFLY.showKefu=function (){
}
this.layerOpen();
this.launchButtonFlag=true;
- $(".launchButton").hide();
-
+ $(".launchButtonBox").hide();
+ var _this=this;
$("body").click(function () {
- clearTimeout(this.titleTimer);
- document.title = this.originTitle;
+ clearTimeout(_this.titleTimer);
+ document.title = _this.originTitle;
});
}
GOFLY.layerOpen=function (){
if (this.launchButtonFlag) return;
+ var _this=this;
layer.open({
type: 2,
title: this.GOFLY_BTN_TEXT,
@@ -145,8 +144,8 @@ GOFLY.layerOpen=function (){
anim: 2,
content: [this.GOFLY_URL+'/chatIndex?kefu_id='+this.GOFLY_KEFU_ID+'&refer='+window.document.title, 'yes'], //iframe的url,no代表不显示滚动条
end: function(){
- this.launchButtonFlag=false;
- $(".launchButton").show();
+ _this.launchButtonFlag=false;
+ $(".launchButtonBox").show();
}
});
}
@@ -164,7 +163,7 @@ GOFLY.flashTitle=function () {
if (this.titleNum == 2) {
document.title = '【你有一条消息】' + this.originTitle;
}
- this.titleTimer = setTimeout("this.flashTitle()", 500);
+ this.titleTimer = setTimeout("GOFLY.flashTitle()", 500);
}