提交 219cfdcd 编写于 作者: huangwensu's avatar huangwensu

Merge branch 'dev-phase1-0111' of...

Merge branch 'dev-phase1-0111' of http://192.168.110.53/com.pica.cloud.education.frontend/pica-admin-IM into dev-phase1-0111
......@@ -488,7 +488,7 @@ export default {
this.POST("/im/msg/forward", params).then(res => {
if (res.code === "000000") {
this.convertMessageList(res.data, 2);
if(this.currentSession.unreadCount) {
if(res.data.length) {
this.readAllMsg();
}
} else {
......@@ -768,13 +768,8 @@ export default {
cc;
sessions.forEach((session, index) => {
if (session.lastMsgType.toLowerCase() == "custom") {
text = "";
cc = JSON.parse(session.lastMsgContent);
if (cc.showType == 1) {
text = cc.title || cc.name;
} else {
text = cc.content || cc.name;
}
text = cc.suffix || cc.content || cc.title || cc.name;
} else if (
session.lastMsgType.toLowerCase() == "image" ||
session.lastMsgType.toLowerCase() == "picture"
......@@ -905,6 +900,7 @@ export default {
// 如果是图片,则要获取其宽与高
if (
params.fileExt.toLowerCase() === ".jpg" ||
params.fileExt.toLowerCase() === ".jpeg" ||
params.fileExt.toLowerCase() === ".png"
) {
params.type = 1;
......@@ -978,6 +974,9 @@ export default {
// 校验结果:1校验通过 2校验不通过
console.log(res.data.checkFlag);
let msg = this.messageList[this.messageList.length - 1];
if(msg.sendId !== sendId) {
msg = this.getMsgBySendId(sendId);
}
if (res.data.checkFlag == 1) {
this.realTimestamp = res.data.timetag;
msg.isShowLoadingIcon = false;
......@@ -989,7 +988,6 @@ export default {
msg.isShowErrorIcon = true;
msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture
}
this.$forceUpdate();
} else {
this.$message({
message: res.message,
......@@ -998,17 +996,33 @@ export default {
}
}).catch( error => {
let msg = this.messageList[this.messageList.length - 1];
if(msg.sendId !== sendId) {
msg = this.getMsgBySendId(sendId);
}
msg.isShowLoadingIcon = false;
msg.isShowErrorIcon = true;
msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture
msg.canRepeatSend = true;
});
this.$forceUpdate();
// 重新开启定时器
forwardMsgIntervalId = setInterval(() => {
this.getMSGForward();
}, 3000);
},
// 根据sendId,查找到对应的消息
getMsgBySendId(sendId) {
console.log('------------getMsgBySendId------------');
let l = this.messageList.length, i = l - 1;
for(; i > 0; i --) {
if(this.messageList[i].sendId == sendId) {
break;
}
}
return this.messageList[i];
},
// 文件大小单位转换
fileSizeChange(val) {
return betaHandle(val);
......
......@@ -224,7 +224,8 @@ export default {
},
// 打开PDF
downPDF(url) {
window.location.href = url
window.open(url, "__blank");
// window.location.href = url
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册