提交 1164bd69 编写于 作者: guangjun.yang's avatar guangjun.yang

缓存数据

上级 2cbda385
......@@ -219,7 +219,9 @@ const CONTAINER_HEIGHT = 700;
let forwardMsgIntervalId = null,
sessionIntervalId = null,
continueIntervalId = null,
autoCompletionIntervalId = null;
autoCompletionIntervalId = null,
cacheMap = {};
let _this = null;
export default {
......@@ -295,7 +297,7 @@ export default {
},
// 监听到有变化,就缓存一下
sendText(newText){
this.currentSession.sendText = newText;
cacheMap[this.currentSession.id] = newText || '';
}
},
......@@ -688,7 +690,7 @@ export default {
this.currentToAccId = session.toAccId;
this.currentSession = session;
this.currentSessionIndex = index;
this.sendText = this.currentSession.sendText || '';
this.sendText = cacheMap[this.currentSession.id];
// 获取当前消息列表(最新的历史消息)
this.getMSGHistory(this.currentSession);
// 获取医生信息
......@@ -743,7 +745,7 @@ export default {
// this.currentSessionIndex = 0;
this.currentSession = this.sessionListData.sessionList[cIndex];
this.currentSessionIndex = cIndex;
this.sendText = this.currentSession.sendText || '';
this.sendText = cacheMap[this.currentSession.id];
this.currentTaskLogId = this.currentSession.taskLogId;
this.currentToAccId = this.currentSession.toAccId;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册