提交 078d759a 编写于 作者: guangjun.yang's avatar guangjun.yang

发送问题

上级 3b90bfb0
...@@ -974,6 +974,9 @@ export default { ...@@ -974,6 +974,9 @@ export default {
// 校验结果:1校验通过 2校验不通过 // 校验结果:1校验通过 2校验不通过
console.log(res.data.checkFlag); console.log(res.data.checkFlag);
let msg = this.messageList[this.messageList.length - 1]; let msg = this.messageList[this.messageList.length - 1];
if(msg.sendId !== sendId) {
msg = this.getMsgBySendId(sendId);
}
if (res.data.checkFlag == 1) { if (res.data.checkFlag == 1) {
this.realTimestamp = res.data.timetag; this.realTimestamp = res.data.timetag;
msg.isShowLoadingIcon = false; msg.isShowLoadingIcon = false;
...@@ -985,7 +988,6 @@ export default { ...@@ -985,7 +988,6 @@ export default {
msg.isShowErrorIcon = true; msg.isShowErrorIcon = true;
msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture
} }
this.$forceUpdate();
} else { } else {
this.$message({ this.$message({
message: res.message, message: res.message,
...@@ -994,17 +996,33 @@ export default { ...@@ -994,17 +996,33 @@ export default {
} }
}).catch( error => { }).catch( error => {
let msg = this.messageList[this.messageList.length - 1]; let msg = this.messageList[this.messageList.length - 1];
if(msg.sendId !== sendId) {
msg = this.getMsgBySendId(sendId);
}
msg.isShowLoadingIcon = false; msg.isShowLoadingIcon = false;
msg.isShowErrorIcon = true; msg.isShowErrorIcon = true;
msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture
msg.canRepeatSend = true; msg.canRepeatSend = true;
}); });
this.$forceUpdate();
// 重新开启定时器 // 重新开启定时器
forwardMsgIntervalId = setInterval(() => { forwardMsgIntervalId = setInterval(() => {
this.getMSGForward(); this.getMSGForward();
}, 3000); }, 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) { fileSizeChange(val) {
return betaHandle(val); return betaHandle(val);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册