|
|
@ -2,6 +2,7 @@ var app=new Vue({
|
|
|
|
el: '#app',
|
|
|
|
el: '#app',
|
|
|
|
delimiters:["<{","}>"],
|
|
|
|
delimiters:["<{","}>"],
|
|
|
|
data: {
|
|
|
|
data: {
|
|
|
|
|
|
|
|
visible:false,
|
|
|
|
chatTitleType:"info",
|
|
|
|
chatTitleType:"info",
|
|
|
|
fullscreenLoading:true,
|
|
|
|
fullscreenLoading:true,
|
|
|
|
leftTabActive:"first",
|
|
|
|
leftTabActive:"first",
|
|
|
@ -41,12 +42,14 @@ var app=new Vue({
|
|
|
|
otherKefus:[],
|
|
|
|
otherKefus:[],
|
|
|
|
replyGroupDialog:false,
|
|
|
|
replyGroupDialog:false,
|
|
|
|
replyContentDialog:false,
|
|
|
|
replyContentDialog:false,
|
|
|
|
|
|
|
|
editReplyContentDialog:false,
|
|
|
|
replySearch:"",
|
|
|
|
replySearch:"",
|
|
|
|
replySearchList:[],
|
|
|
|
replySearchList:[],
|
|
|
|
replySearchListActive:[],
|
|
|
|
replySearchListActive:[],
|
|
|
|
groupName:"",
|
|
|
|
groupName:"",
|
|
|
|
groupId:"",
|
|
|
|
groupId:"",
|
|
|
|
replys:[],
|
|
|
|
replys:[],
|
|
|
|
|
|
|
|
replyId:"",
|
|
|
|
replyContent:"",
|
|
|
|
replyContent:"",
|
|
|
|
replyTitle:"",
|
|
|
|
replyTitle:"",
|
|
|
|
ipBlacks:[],
|
|
|
|
ipBlacks:[],
|
|
|
@ -102,6 +105,7 @@ var app=new Vue({
|
|
|
|
case "userOnline":
|
|
|
|
case "userOnline":
|
|
|
|
this.addOnlineUser(redata.data);
|
|
|
|
this.addOnlineUser(redata.data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "userOffline":
|
|
|
|
case "userOffline":
|
|
|
|
this.removeOfflineUser(redata.data);
|
|
|
|
this.removeOfflineUser(redata.data);
|
|
|
@ -119,6 +123,7 @@ var app=new Vue({
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (redata.type == "message") {
|
|
|
|
if (redata.type == "message") {
|
|
|
|
let msg = redata.data
|
|
|
|
let msg = redata.data
|
|
|
|
let content = {}
|
|
|
|
let content = {}
|
|
|
@ -148,6 +153,7 @@ var app=new Vue({
|
|
|
|
name:msg.name,
|
|
|
|
name:msg.name,
|
|
|
|
body: msg.content,
|
|
|
|
body: msg.content,
|
|
|
|
icon: msg.avator
|
|
|
|
icon: msg.avator
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
_this.alertSound();
|
|
|
|
_this.alertSound();
|
|
|
|
_this.chatInputing="";
|
|
|
|
_this.chatInputing="";
|
|
|
@ -214,6 +220,7 @@ var app=new Vue({
|
|
|
|
// content.is_kefu = true;
|
|
|
|
// content.is_kefu = true;
|
|
|
|
// content.time = '';
|
|
|
|
// content.time = '';
|
|
|
|
// this.msgList.push(content);
|
|
|
|
// this.msgList.push(content);
|
|
|
|
|
|
|
|
_this.sendDisabled=false;
|
|
|
|
this.scrollBottom();
|
|
|
|
this.scrollBottom();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//处理当前在线用户列表
|
|
|
|
//处理当前在线用户列表
|
|
|
@ -237,6 +244,9 @@ var app=new Vue({
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(this.visitor.visitor_id==retData.uid){
|
|
|
|
|
|
|
|
this.getVistorInfo(retData.uid)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//处理当前在线用户列表
|
|
|
|
//处理当前在线用户列表
|
|
|
@ -386,6 +396,9 @@ var app=new Vue({
|
|
|
|
type: 'error'
|
|
|
|
type: 'error'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(data.code==400){
|
|
|
|
|
|
|
|
window.location.href="/login";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -500,6 +513,9 @@ var app=new Vue({
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
replaceContent(content){
|
|
|
|
|
|
|
|
return replaceContent(content)
|
|
|
|
|
|
|
|
},
|
|
|
|
//滚到底部
|
|
|
|
//滚到底部
|
|
|
|
scrollBottom(){
|
|
|
|
scrollBottom(){
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
@ -747,6 +763,27 @@ var app=new Vue({
|
|
|
|
_this.getReplys();
|
|
|
|
_this.getReplys();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
//编辑回复
|
|
|
|
|
|
|
|
editReplyContent(save,id,title,content){
|
|
|
|
|
|
|
|
var _this=this;
|
|
|
|
|
|
|
|
if(save=='yes'){
|
|
|
|
|
|
|
|
var data={
|
|
|
|
|
|
|
|
reply_id:this.replyId,
|
|
|
|
|
|
|
|
reply_title:this.replyTitle,
|
|
|
|
|
|
|
|
reply_content:this.replyContent
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.sendAjax("/reply_content_save","post",data,function(result){
|
|
|
|
|
|
|
|
_this.editReplyContentDialog=false;
|
|
|
|
|
|
|
|
_this.getReplys();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.editReplyContentDialog=true;
|
|
|
|
|
|
|
|
this.replyId=id;
|
|
|
|
|
|
|
|
this.replyTitle=title;
|
|
|
|
|
|
|
|
this.replyContent=content;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
//搜索回复
|
|
|
|
//搜索回复
|
|
|
|
searchReply(){
|
|
|
|
searchReply(){
|
|
|
|
var _this=this;
|
|
|
|
var _this=this;
|
|
|
@ -779,6 +816,7 @@ var app=new Vue({
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//划词搜索
|
|
|
|
//划词搜索
|
|
|
|
selectText(){
|
|
|
|
selectText(){
|
|
|
|
|
|
|
|
return false;
|
|
|
|
var _this=this;
|
|
|
|
var _this=this;
|
|
|
|
$('body').click(function(){
|
|
|
|
$('body').click(function(){
|
|
|
|
try{
|
|
|
|
try{
|
|
|
|