This commit is contained in:
kuaifan 2022-06-05 23:15:40 +08:00
parent b9b45e8e4f
commit ab24af6e79
3 changed files with 5 additions and 4 deletions

View File

@ -436,9 +436,9 @@ export default {
watch: { watch: {
'$route': { '$route': {
handler (route) { handler (route) {
if ($A.isJson(window.__sendDialogMsg) && window.__sendDialogMsg.time > $A.Time()) { if (this.$store.state.dialogMsgTransfer.time > $A.Time()) {
const {msgFile, msgRecord, msgText} = window.__sendDialogMsg; this.$store.state.dialogMsgTransfer.time = 0;
window.__sendDialogMsg = null; const {msgFile, msgRecord, msgText} = this.$store.state.dialogMsgTransfer;
this.$nextTick(() => { this.$nextTick(() => {
if ($A.isArray(msgFile) && msgFile.length > 0) { if ($A.isArray(msgFile) && msgFile.length > 0) {
this.sendFileMsg(msgFile); this.sendFileMsg(msgFile);

View File

@ -1107,7 +1107,7 @@ export default {
} else { } else {
this.$nextTick(() => { this.$nextTick(() => {
if (this.windowMax768) { if (this.windowMax768) {
window.__sendDialogMsg = { this.$store.state.dialogMsgTransfer = {
time: $A.Time() + 10, time: $A.Time() + 10,
msgText: this.msgText, msgText: this.msgText,
msgFile: this.msgFile, msgFile: this.msgFile,

View File

@ -66,6 +66,7 @@ const stateData = {
// 会话聊天 // 会话聊天
dialogMsgs: [], dialogMsgs: [],
dialogMsgTransfer: {time: 0},
dialogInputCache: $A.getStorageArray("cacheDialogInput"), dialogInputCache: $A.getStorageArray("cacheDialogInput"),
// 文件 // 文件