首页自动弹出来

pull/30/head
taoshihan1991 4 years ago
parent 07b4cbf032
commit 91ead50ed9

@ -135,7 +135,9 @@
</div> </div>
</footer> </footer>
<script> <script>
var flag=false;
$("#visitorBtn").click(function(){ $("#visitorBtn").click(function(){
if(flag) return;
layer.open({ layer.open({
type: 2, type: 2,
title: '{{.OnlineChat}}', title: '{{.OnlineChat}}',
@ -145,10 +147,26 @@ $("#visitorBtn").click(function(){
area: ['550px', '520px'], area: ['550px', '520px'],
content: ['/chat_page?lang={{.Lang}}','no'], content: ['/chat_page?lang={{.Lang}}','no'],
end: function(){ end: function(){
$(".chatBtn").show(); flag=false;
} }
}); });
flag=true;
}); });
setTimeout(function(){
if(flag) return;
layer.open({
type: 2,
title: '{{.OnlineChat}}',
shadeClose: true,
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['550px', '520px'],
content: ['/chat_page?lang={{.Lang}}','no'],
end: function(){
flag=false;
}
});
},5000);
window.addEventListener('message',function(e){ window.addEventListener('message',function(e){
var msg=e.data; var msg=e.data;
if(msg.type=="message"){ if(msg.type=="message"){

Loading…
Cancel
Save