|
|
@ -95,28 +95,36 @@ GOFLY.clickBtn=function (){
|
|
|
|
$(".launchButtonBox").on("click",function() {
|
|
|
|
$(".launchButtonBox").on("click",function() {
|
|
|
|
_this.showKefu();
|
|
|
|
_this.showKefu();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
setTimeout(function(){
|
|
|
|
_this.getNotice();
|
|
|
|
$("#launchIcon").show();
|
|
|
|
|
|
|
|
_this.getNotice();
|
|
|
|
|
|
|
|
},4000);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GOFLY.getNotice=function(){
|
|
|
|
GOFLY.getNotice=function(){
|
|
|
|
var _this=this;
|
|
|
|
var _this=this;
|
|
|
|
$.get(this.GOFLY_URL+"/notice?kefu_id="+this.GOFLY_KEFU_ID,function(res) {
|
|
|
|
$.get(this.GOFLY_URL+"/notice?kefu_id="+this.GOFLY_KEFU_ID,function(res) {
|
|
|
|
//debugger;
|
|
|
|
//debugger;
|
|
|
|
if (res.result != null) {
|
|
|
|
if (res.result.welcome != null) {
|
|
|
|
var msg = res.result;
|
|
|
|
var msg = res.result.welcome;
|
|
|
|
var len=msg.length;
|
|
|
|
var len=msg.length;
|
|
|
|
var i=0;
|
|
|
|
var i=0;
|
|
|
|
if(len>0){
|
|
|
|
if(len>0){
|
|
|
|
if(typeof msg[0]=="undefined"||msg[0]==null){
|
|
|
|
|
|
|
|
return;
|
|
|
|
_this.noticeTimer=setInterval(function(){
|
|
|
|
}
|
|
|
|
if(i==0){
|
|
|
|
var content = msg[0];
|
|
|
|
$("#launchIcon").text(len).show();
|
|
|
|
if(typeof content.content =="undefined"){
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
if(i>=len||typeof msg[i]=="undefined"||msg[i]==null){
|
|
|
|
}
|
|
|
|
clearInterval(_this.noticeTimer);
|
|
|
|
$("#launchButtonNotice").html(replaceContent(content.content,_this.GOFLY_URL)).show();
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var content = msg[i];
|
|
|
|
|
|
|
|
if(typeof content.content =="undefined"){
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
content.content = replaceContent(content.content);
|
|
|
|
|
|
|
|
var welcomeHtml="<div class='flyUser'><img class='flyAvatar' src='"+res.result.avatar+"'/> <span class='flyUsername'>"+res.result.username+"</span></div>";
|
|
|
|
|
|
|
|
welcomeHtml+="<div>"+replaceContent(content.content,_this.GOFLY_URL)+"</div>";
|
|
|
|
|
|
|
|
$("#launchButtonNotice").html(welcomeHtml).show();
|
|
|
|
|
|
|
|
i++;
|
|
|
|
|
|
|
|
},4000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|