|
|
|
@ -267,6 +267,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
|
|
// ==================== 投诉选择模式 ====================
|
|
|
|
// ==================== 投诉选择模式 ====================
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取可选的消息列表(排除系统提示消息)
|
|
|
|
* 获取可选的消息列表(排除系统提示消息)
|
|
|
|
@ -628,7 +629,6 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 构造临时消息(模拟文件对象)
|
|
|
|
// 构造临时消息(模拟文件对象)
|
|
|
|
const data = { originUrl: filePath, thumbUrl: filePath };
|
|
|
|
const data = { originUrl: filePath, thumbUrl: filePath };
|
|
|
|
|
|
|
|
|
|
|
|
const msgInfo = {
|
|
|
|
const msgInfo = {
|
|
|
|
id: 0,
|
|
|
|
id: 0,
|
|
|
|
tmpId: this.generateId(),
|
|
|
|
tmpId: this.generateId(),
|
|
|
|
@ -639,7 +639,7 @@ export default {
|
|
|
|
type: this.$enums.MESSAGE_TYPE.IMAGE,
|
|
|
|
type: this.$enums.MESSAGE_TYPE.IMAGE,
|
|
|
|
readedCount: 0,
|
|
|
|
readedCount: 0,
|
|
|
|
loadStatus: 'loading',
|
|
|
|
loadStatus: 'loading',
|
|
|
|
status: this.$enums.MESSAGE_STATUS.UNSEND,
|
|
|
|
// status: this.$enums.MESSAGE_STATUS.UNSEND,
|
|
|
|
receipt: this.isReceipt
|
|
|
|
receipt: this.isReceipt
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@ -665,6 +665,7 @@ export default {
|
|
|
|
// 发送消息请求
|
|
|
|
// 发送消息请求
|
|
|
|
this.sendMessageRequest(msgInfo).then(m => {
|
|
|
|
this.sendMessageRequest(msgInfo).then(m => {
|
|
|
|
msgInfo.loadStatus = 'ok';
|
|
|
|
msgInfo.loadStatus = 'ok';
|
|
|
|
|
|
|
|
msgInfo.status=m.status
|
|
|
|
msgInfo.id = m.id;
|
|
|
|
msgInfo.id = m.id;
|
|
|
|
// 再次插入更新消息
|
|
|
|
// 再次插入更新消息
|
|
|
|
this.insertMessage({ msgInfo, chatInfo: this.chat });
|
|
|
|
this.insertMessage({ msgInfo, chatInfo: this.chat });
|
|
|
|
@ -703,7 +704,7 @@ export default {
|
|
|
|
selfSend: true,
|
|
|
|
selfSend: true,
|
|
|
|
type: this.$enums.MESSAGE_TYPE.VIDEO,
|
|
|
|
type: this.$enums.MESSAGE_TYPE.VIDEO,
|
|
|
|
loadStatus: 'loading',
|
|
|
|
loadStatus: 'loading',
|
|
|
|
status: this.$enums.MESSAGE_STATUS.UNSEND,
|
|
|
|
// status: this.$enums.MESSAGE_STATUS.UNSEND,
|
|
|
|
receipt: this.isReceipt
|
|
|
|
receipt: this.isReceipt
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.fillTargetId(msgInfo, this.chat.targetId);
|
|
|
|
this.fillTargetId(msgInfo, this.chat.targetId);
|
|
|
|
@ -724,6 +725,7 @@ export default {
|
|
|
|
this.sendMessageRequest(msgInfo).then(m => {
|
|
|
|
this.sendMessageRequest(msgInfo).then(m => {
|
|
|
|
msgInfo.loadStatus = 'ok';
|
|
|
|
msgInfo.loadStatus = 'ok';
|
|
|
|
msgInfo.id = m.id;
|
|
|
|
msgInfo.id = m.id;
|
|
|
|
|
|
|
|
msgInfo.status=m.status
|
|
|
|
this.insertMessage({ msgInfo, chatInfo: this.chat });
|
|
|
|
this.insertMessage({ msgInfo, chatInfo: this.chat });
|
|
|
|
this.isReceipt = true;
|
|
|
|
this.isReceipt = true;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -761,7 +763,7 @@ export default {
|
|
|
|
receipt: this.isReceipt
|
|
|
|
receipt: this.isReceipt
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.fillTargetId(msgInfo, this.chat.targetId);
|
|
|
|
this.fillTargetId(msgInfo, this.chat.targetId);
|
|
|
|
this.insertMessage({ msgInfo, chatInfo: this.chat });
|
|
|
|
// this.insertMessage({ msgInfo, chatInfo: this.chat });
|
|
|
|
this.moveChatToTop();
|
|
|
|
this.moveChatToTop();
|
|
|
|
this.scrollToBottom();
|
|
|
|
this.scrollToBottom();
|
|
|
|
|
|
|
|
|
|
|
|
@ -779,6 +781,8 @@ export default {
|
|
|
|
this.sendMessageRequest(msgInfo).then(m => {
|
|
|
|
this.sendMessageRequest(msgInfo).then(m => {
|
|
|
|
msgInfo.loadStatus = 'ok';
|
|
|
|
msgInfo.loadStatus = 'ok';
|
|
|
|
msgInfo.id = m.id;
|
|
|
|
msgInfo.id = m.id;
|
|
|
|
|
|
|
|
msgInfo.status=m.status
|
|
|
|
|
|
|
|
console.log("msgInfo1",msgInfo)
|
|
|
|
this.insertMessage({ msgInfo, chatInfo: this.chat });
|
|
|
|
this.insertMessage({ msgInfo, chatInfo: this.chat });
|
|
|
|
this.isReceipt = true;
|
|
|
|
this.isReceipt = true;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -1061,7 +1065,6 @@ export default {
|
|
|
|
}, 100);
|
|
|
|
}, 100);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onScrollToTop() {
|
|
|
|
onScrollToTop() {
|
|
|
|
console.log("lalal...........")
|
|
|
|
|
|
|
|
if (this.showMinIdx > 0) {
|
|
|
|
if (this.showMinIdx > 0) {
|
|
|
|
// #ifndef H5
|
|
|
|
// #ifndef H5
|
|
|
|
this.scrollToMsgIdx(this.showMinIdx);
|
|
|
|
this.scrollToMsgIdx(this.showMinIdx);
|
|
|
|
@ -1160,6 +1163,7 @@ export default {
|
|
|
|
return str.replace(/[<>&"]/g, c => ({ '<': '<', '>': '>', '&': '&', '"': '"' }[c]));
|
|
|
|
return str.replace(/[<>&"]/g, c => ({ '<': '<', '>': '>', '&': '&', '"': '"' }[c]));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
sendMessageRequest(msgInfo) {
|
|
|
|
sendMessageRequest(msgInfo) {
|
|
|
|
|
|
|
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
this.reqQueue.push({ msgInfo, resolve, reject });
|
|
|
|
this.reqQueue.push({ msgInfo, resolve, reject });
|
|
|
|
this.processReqQueue();
|
|
|
|
this.processReqQueue();
|
|
|
|
|