|
|
@ -14,6 +14,7 @@ new Vue({
|
|
|
|
face:[],
|
|
|
|
face:[],
|
|
|
|
showKfonline:false,
|
|
|
|
showKfonline:false,
|
|
|
|
socketClosed:false,
|
|
|
|
socketClosed:false,
|
|
|
|
|
|
|
|
timer:null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
//初始化websocket
|
|
|
|
//初始化websocket
|
|
|
@ -126,6 +127,7 @@ new Vue({
|
|
|
|
//_this.saveHistory(content);
|
|
|
|
//_this.saveHistory(content);
|
|
|
|
_this.scrollBottom();
|
|
|
|
_this.scrollBottom();
|
|
|
|
_this.messageContent = "";
|
|
|
|
_this.messageContent = "";
|
|
|
|
|
|
|
|
clearInterval(_this.timer);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -231,14 +233,21 @@ new Vue({
|
|
|
|
//debugger;
|
|
|
|
//debugger;
|
|
|
|
if (res.result != null) {
|
|
|
|
if (res.result != null) {
|
|
|
|
let msg = res.result;
|
|
|
|
let msg = res.result;
|
|
|
|
for(let i=0;i<msg.length;i++){
|
|
|
|
var len=msg.length;
|
|
|
|
let content = msg[i];
|
|
|
|
var i=0;
|
|
|
|
content.content = replaceContent(content.content);
|
|
|
|
if(len>0){
|
|
|
|
setTimeout(function () {
|
|
|
|
_this.timer=setInterval(function(){
|
|
|
|
|
|
|
|
if(i>=len){
|
|
|
|
|
|
|
|
clearInterval(_this.timer);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let content = msg[i];
|
|
|
|
|
|
|
|
content.content = replaceContent(content.content);
|
|
|
|
_this.msgList.push(content);
|
|
|
|
_this.msgList.push(content);
|
|
|
|
_this.scrollBottom();
|
|
|
|
_this.scrollBottom();
|
|
|
|
}, 5000*(i+1));
|
|
|
|
i++;
|
|
|
|
|
|
|
|
},3000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|