提示框可关闭和滚动优化

pull/23/head
陶士涵 4 years ago
parent 2a0c1fe435
commit 65705f6efe

@ -14,7 +14,6 @@
border-radius: 4px; border-radius: 4px;
background-color: #fff; background-color: #fff;
overflow: hidden; overflow: hidden;
cursor: pointer;
box-shadow: 0 3px 15px 0 rgba(0,0,0,.25)!important; box-shadow: 0 3px 15px 0 rgba(0,0,0,.25)!important;
position: absolute; position: absolute;
bottom: 60px; bottom: 60px;
@ -25,7 +24,7 @@
display: none; display: none;
} }
.launchButtonNotice a{ .launchButtonNotice a{
color: #07a9fe; color: #07a9fe;!important;
text-decoration: none; text-decoration: none;
} }
.launchIcon{ .launchIcon{
@ -105,6 +104,15 @@
line-height: 32px; line-height: 32px;
margin-bottom: 4px; margin-bottom: 4px;
} }
.launchButtonNotice .flyClose{
float: right;
display: inline-block;
text-align: center;
width: 30px;
height: 30px;
line-height: 30px;
cursor: pointer;
}
@-webkit-keyframes bounce-up { @-webkit-keyframes bounce-up {
25% {-webkit-transform: translateY(6px);} 25% {-webkit-transform: translateY(6px);}
50%, 100% {-webkit-transform: translateY(0);} 50%, 100% {-webkit-transform: translateY(0);}

@ -264,7 +264,9 @@ new Vue({
} }
content.content = replaceContent(content.content); content.content = replaceContent(content.content);
_this.msgList.push(content); _this.msgList.push(content);
_this.scrollBottom(); if(_this.msgList.length>=5){
_this.scrollBottom();
}
if(i==0){ if(i==0){
_this.alertSound(); _this.alertSound();
} }

@ -92,9 +92,12 @@ 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);
$(".launchButtonBox").on("click",function() { $(".launchButton").on("click",function() {
_this.showKefu(); _this.showKefu();
}); });
$("body").on("click","#launchNoticeClose",function() {
$("#launchButtonNotice").hide();
});
_this.getNotice(); _this.getNotice();
} }
GOFLY.getNotice=function(){ GOFLY.getNotice=function(){
@ -116,7 +119,9 @@ GOFLY.getNotice=function(){
if(typeof content.content =="undefined"){ if(typeof content.content =="undefined"){
return; return;
} }
var welcomeHtml="<div class='flyUser'><img class='flyAvatar' src='"+_this.GOFLY_URL+res.result.avatar+"'/> <span class='flyUsername'>"+res.result.username+"</span></div>"; var welcomeHtml="<div class='flyUser'><img class='flyAvatar' src='"+_this.GOFLY_URL+res.result.avatar+"'/> <span class='flyUsername'>"+res.result.username+"</span>" +
"<span id='launchNoticeClose' class='flyClose'>×</span>" +
"</div>";
welcomeHtml+="<div>"+replaceContent(content.content,_this.GOFLY_URL)+"</div>"; welcomeHtml+="<div>"+replaceContent(content.content,_this.GOFLY_URL)+"</div>";
$("#launchButtonNotice").html(welcomeHtml).show(); $("#launchButtonNotice").html(welcomeHtml).show();
i++; i++;

Loading…
Cancel
Save