|
@@ -105,10 +105,12 @@
|
|
<el-dialog :visible.sync="dialogVideoVisible"
|
|
<el-dialog :visible.sync="dialogVideoVisible"
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
:destroy-on-close="true"
|
|
:destroy-on-close="true"
|
|
|
|
+ :width="aplayer.pWidth"
|
|
|
|
+ :height="aplayer.height"
|
|
@close="dialogVideoVisible=false"
|
|
@close="dialogVideoVisible=false"
|
|
ref="player"
|
|
ref="player"
|
|
>
|
|
>
|
|
- <videoPlayer :width="aplayer.width" :height="aplayer.height" :vid="aplayer.vid" :autoplay="true"
|
|
|
|
|
|
+ <videoPlayer :width="aplayer.width" :height="aplayer.height" :videoWidth="aplayer.videoWidth" :videoHeight="aplayer.videoHeight" :vid="aplayer.vid" :autoplay="true"
|
|
:source="dialogVideoUrl" :cover="dialogVideoCover" ref="player"></videoPlayer>
|
|
:source="dialogVideoUrl" :cover="dialogVideoCover" ref="player"></videoPlayer>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
@@ -289,8 +291,12 @@ export default {
|
|
pickUploadImgData:null,
|
|
pickUploadImgData:null,
|
|
aplayer: {
|
|
aplayer: {
|
|
vid: "bf9b7e4a36d84aea8cee769765fbc28b",
|
|
vid: "bf9b7e4a36d84aea8cee769765fbc28b",
|
|
- videoHeight:"1000px",
|
|
|
|
- videoWidth:"800px"
|
|
|
|
|
|
+ pWidth:"1040px",
|
|
|
|
+ width:"1000px",
|
|
|
|
+ height:"900px",
|
|
|
|
+ videoWidth:"1000px",
|
|
|
|
+ videoHeight:"900px"
|
|
|
|
+
|
|
},
|
|
},
|
|
player: null,
|
|
player: null,
|
|
roomMembers:[],
|
|
roomMembers:[],
|
|
@@ -400,7 +406,7 @@ export default {
|
|
<div class="article">
|
|
<div class="article">
|
|
<ul>
|
|
<ul>
|
|
<li class="article-item">
|
|
<li class="article-item">
|
|
- <h2>人民日报谈网红带货:产品真的值得买吗?</h2>
|
|
|
|
|
|
+ <h2>网红带货:产品真的值得买吗?</h2>
|
|
</li>
|
|
</li>
|
|
<li class="article-item">
|
|
<li class="article-item">
|
|
甘肃夏河县发生5.7级地震 暂未接到人员伤亡报告
|
|
甘肃夏河县发生5.7级地震 暂未接到人员伤亡报告
|
|
@@ -443,12 +449,12 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
initSocket(userId) {
|
|
initSocket(userId) {
|
|
let that=this;
|
|
let that=this;
|
|
- console.log("qxj socket:"+this.qwIm.socket);
|
|
|
|
|
|
+
|
|
if(!!this.qwIm.socket){
|
|
if(!!this.qwIm.socket){
|
|
this.qwIm.initSocket(userId,true);
|
|
this.qwIm.initSocket(userId,true);
|
|
// 监听socket连接
|
|
// 监听socket连接
|
|
this.qwIm.socket.onopen = function() {
|
|
this.qwIm.socket.onopen = function() {
|
|
- console.log("socket连接成功");
|
|
|
|
|
|
+ console.log("socket 连接成功...");
|
|
};
|
|
};
|
|
this.qwIm.socket.onerror = function() {
|
|
this.qwIm.socket.onerror = function() {
|
|
console.log("连接错误")
|
|
console.log("连接错误")
|
|
@@ -458,6 +464,9 @@ export default {
|
|
this.qwIm.socket.onmessage = function(res) {
|
|
this.qwIm.socket.onmessage = function(res) {
|
|
var data=JSON.parse(res.data);
|
|
var data=JSON.parse(res.data);
|
|
console.log("收到服务端内容", JSON.stringify(data));
|
|
console.log("收到服务端内容", JSON.stringify(data));
|
|
|
|
+ if(data.cmd=="heartbeat"){ //收到心跳数据不处理
|
|
|
|
+ console.log("收到心跳数据 heartbeat");
|
|
|
|
+ }
|
|
if(data.cmd=="offline"){
|
|
if(data.cmd=="offline"){
|
|
that.$message.error('企微号已下线');
|
|
that.$message.error('企微号已下线');
|
|
that.$store.dispatch('qwLoginOut').then(() => {
|
|
that.$store.dispatch('qwLoginOut').then(() => {
|
|
@@ -498,9 +507,9 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
- // 监听socket消息
|
|
|
|
- this.qwIm.socket.onclose = function(res) {
|
|
|
|
- console.log("socket已经关闭")
|
|
|
|
|
|
+ // 监听socket重连
|
|
|
|
+ this.qwIm.socket.onreconnect = function(res) {
|
|
|
|
+ console.log("socket 断线重连...")
|
|
};
|
|
};
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -570,7 +579,6 @@ export default {
|
|
},
|
|
},
|
|
handlePullMessages(contact, next,instance) {
|
|
handlePullMessages(contact, next,instance) {
|
|
const { IMUI } = this.$refs;
|
|
const { IMUI } = this.$refs;
|
|
- //console.log("qxj instance:"+instance.getMessages(instance.currentContactId));
|
|
|
|
let isEnd = false;
|
|
let isEnd = false;
|
|
getMessageList(this.queryParams).then(response => {
|
|
getMessageList(this.queryParams).then(response => {
|
|
if(response.code==200){
|
|
if(response.code==200){
|
|
@@ -587,16 +595,18 @@ export default {
|
|
// }, 2000);
|
|
// }, 2000);
|
|
|
|
|
|
},
|
|
},
|
|
- handleChangeConversation(contact, instance) {
|
|
|
|
- console.log("qxj ChangeConversation:"+JSON.stringify(contact));
|
|
|
|
- if (!pages[contact.conversationId]){
|
|
|
|
- pages[contact.conversationId] =1;
|
|
|
|
|
|
+ handleChangeConversation(conversation, instance) {
|
|
|
|
+ //console.log("qxj ChangeConversation:"+JSON.stringify(conversation));
|
|
|
|
+ if (!pages[conversation.conversationId]){
|
|
|
|
+ pages[conversation.conversationId] =1;
|
|
}
|
|
}
|
|
- this.queryParams.pageNum=pages[contact.conversationId];
|
|
|
|
- this.queryParams.conversationId=contact.conversationId;
|
|
|
|
- //instance.updateContact(contact);
|
|
|
|
-
|
|
|
|
- instance.closeDrawer();
|
|
|
|
|
|
+ this.queryParams.pageNum=pages[conversation.conversationId];
|
|
|
|
+ this.queryParams.conversationId=conversation.conversationId;
|
|
|
|
+ if(conversation.unread>0){
|
|
|
|
+ conversation.unread==0;
|
|
|
|
+ instance.updateContact(conversation);
|
|
|
|
+ }
|
|
|
|
+ instance.closeDrawer();
|
|
},
|
|
},
|
|
handleChangeContact(contact, instance) {
|
|
handleChangeContact(contact, instance) {
|
|
|
|
|
|
@@ -654,7 +664,7 @@ export default {
|
|
params={"conversationId":message.toContactId,"deviceId":this.qwUser.deviceId,"userId":this.qwUser.userId,"content":message.content};
|
|
params={"conversationId":message.toContactId,"deviceId":this.qwUser.deviceId,"userId":this.qwUser.userId,"content":message.content};
|
|
sendTextMsg(params).then(response => {
|
|
sendTextMsg(params).then(response => {
|
|
if(response.code==200){
|
|
if(response.code==200){
|
|
- var conversation=IMUI.findConversations(message.toContactId);
|
|
|
|
|
|
+ var conversation=IMUI.findConversation(message.toContactId);
|
|
conversation.lastSendTime=message.sendTime;
|
|
conversation.lastSendTime=message.sendTime;
|
|
conversation.lastContent=message.content;
|
|
conversation.lastContent=message.content;
|
|
IMUI.topPopConversations(conversation);
|
|
IMUI.topPopConversations(conversation);
|
|
@@ -666,7 +676,7 @@ export default {
|
|
params={"conversationId":message.toContactId,"deviceId":this.qwUser.deviceId,"userId":this.qwUser.userId,"materialId":this.pickUploadImgData.id};
|
|
params={"conversationId":message.toContactId,"deviceId":this.qwUser.deviceId,"userId":this.qwUser.userId,"materialId":this.pickUploadImgData.id};
|
|
sendImageMsg(params).then(response => {
|
|
sendImageMsg(params).then(response => {
|
|
if(response.code==200){
|
|
if(response.code==200){
|
|
- var conversation=IMUI.findConversations(message.toContactId);
|
|
|
|
|
|
+ var conversation=IMUI.findConversation(message.toContactId);
|
|
conversation.lastSendTime=message.sendTime;
|
|
conversation.lastSendTime=message.sendTime;
|
|
conversation.lastContent="[图片]";
|
|
conversation.lastContent="[图片]";
|
|
IMUI.topPopConversations(conversation);
|
|
IMUI.topPopConversations(conversation);
|