前端提示框

pull/23/head
taoshihan1991 5 years ago
parent c982c49233
commit b4bb3e6381

@ -84,7 +84,7 @@ new Vue({
this.socket.close(); this.socket.close();
this.socketClosed=true; this.socketClosed=true;
} }
//window.parent.postMessage(redata); window.parent.postMessage(redata);
}, },
//发送给客户 //发送给客户
chatToUser:function() { chatToUser:function() {

@ -42,6 +42,7 @@ GOFLY.init=function(config){
}); });
window.onfocus = function () { window.onfocus = function () {
clearTimeout(this.titleTimer); clearTimeout(this.titleTimer);
console.log(1);
document.title = _this.originTitle; document.title = _this.originTitle;
}; };
} }
@ -78,10 +79,7 @@ GOFLY.clickBtn=function (){
'<div id="launchButtonNotice" class="launchButtonNotice">您好:<br/>极简强大的开源免费Go语言在线客服单页营销系统来了解一下</div>' + '<div id="launchButtonNotice" class="launchButtonNotice">您好:<br/>极简强大的开源免费Go语言在线客服单页营销系统来了解一下</div>' +
'</div>'; '</div>';
$('body').append(html); $('body').append(html);
$("#launchButton").on("click",function() { $(".launchButtonBox").on("click",function() {
_this.showKefu();
});
$("#launchButtonNotice").on("click",function() {
_this.showKefu(); _this.showKefu();
}); });
setTimeout(function(){ setTimeout(function(){
@ -126,15 +124,16 @@ GOFLY.showKefu=function (){
} }
this.layerOpen(); this.layerOpen();
this.launchButtonFlag=true; this.launchButtonFlag=true;
$(".launchButton").hide(); $(".launchButtonBox").hide();
var _this=this;
$("body").click(function () { $("body").click(function () {
clearTimeout(this.titleTimer); clearTimeout(_this.titleTimer);
document.title = this.originTitle; document.title = _this.originTitle;
}); });
} }
GOFLY.layerOpen=function (){ GOFLY.layerOpen=function (){
if (this.launchButtonFlag) return; if (this.launchButtonFlag) return;
var _this=this;
layer.open({ layer.open({
type: 2, type: 2,
title: this.GOFLY_BTN_TEXT, title: this.GOFLY_BTN_TEXT,
@ -145,8 +144,8 @@ GOFLY.layerOpen=function (){
anim: 2, anim: 2,
content: [this.GOFLY_URL+'/chatIndex?kefu_id='+this.GOFLY_KEFU_ID+'&refer='+window.document.title, 'yes'], //iframe的urlno代表不显示滚动条 content: [this.GOFLY_URL+'/chatIndex?kefu_id='+this.GOFLY_KEFU_ID+'&refer='+window.document.title, 'yes'], //iframe的urlno代表不显示滚动条
end: function(){ end: function(){
this.launchButtonFlag=false; _this.launchButtonFlag=false;
$(".launchButton").show(); $(".launchButtonBox").show();
} }
}); });
} }
@ -164,7 +163,7 @@ GOFLY.flashTitle=function () {
if (this.titleNum == 2) { if (this.titleNum == 2) {
document.title = '【你有一条消息】' + this.originTitle; document.title = '【你有一条消息】' + this.originTitle;
} }
this.titleTimer = setTimeout("this.flashTitle()", 500); this.titleTimer = setTimeout("GOFLY.flashTitle()", 500);
} }

Loading…
Cancel
Save