防止layer冲突

pull/23/head
taoshihan1991 3 years ago
parent 33c9b2ed27
commit db909c6e11

@ -132,7 +132,7 @@
line-height: 30px; line-height: 30px;
cursor: pointer; cursor: pointer;
} }
#layui-layer1{ #layui-layer19911116{
display: none; display: none;
} }
.launchPointer{ .launchPointer{

@ -237,11 +237,13 @@ GOFLY.showKefu=function (){
} }
GOFLY.layerOpen=function (width,height){ GOFLY.layerOpen=function (width,height){
if (this.launchButtonFlag) return; if (this.launchButtonFlag) return;
if($("#layui-layer1").css("display")=="none"){ var layBox=$("#layui-layer19911116");
$("#layui-layer1").show(); if(layBox.css("display")=="none"){
layBox.show();
return; return;
} }
var _this=this; var _this=this;
layer.index="19911115";
layer.open({ layer.open({
type: 2, type: 2,
title: this.chatPageTitle, title: this.chatPageTitle,
@ -252,8 +254,9 @@ GOFLY.layerOpen=function (width,height){
anim: 2, anim: 2,
content: [this.GOFLY_URL+'/chatIndex?kefu_id='+this.GOFLY_KEFU_ID+'&lang='+this.GOFLY_LANG+'&refer='+window.document.title+'&extra='+this.GOFLY_EXTRA , 'yes'], //iframe的urlno代表不显示滚动条 content: [this.GOFLY_URL+'/chatIndex?kefu_id='+this.GOFLY_KEFU_ID+'&lang='+this.GOFLY_LANG+'&refer='+window.document.title+'&extra='+this.GOFLY_EXTRA , 'yes'], //iframe的urlno代表不显示滚动条
success:function(){ success:function(){
if(!_this.GOFLY_AUTO_OPEN && $("#layui-layer1").css("display")=="none"){ var layBox=$("#layui-layer19911116");
$("#layui-layer1").show(); if(!_this.GOFLY_AUTO_OPEN && layBox.css("display")=="none"){
layBox.show();
} }
}, },
end: function(){ end: function(){
@ -261,7 +264,7 @@ GOFLY.layerOpen=function (width,height){
$(".launchButtonBox").show(); $(".launchButtonBox").show();
}, },
cancel: function(index, layero){ cancel: function(index, layero){
$("#layui-layer1").hide(); $("#layui-layer19911116").hide();
_this.launchButtonFlag=false; _this.launchButtonFlag=false;
$(".launchButtonBox").show(); $(".launchButtonBox").show();
return false; return false;

Loading…
Cancel
Save