提交 2cbda385 编写于 作者: guangjun.yang's avatar guangjun.yang

缓存发送消息

上级 790800f1
...@@ -293,6 +293,10 @@ export default { ...@@ -293,6 +293,10 @@ export default {
}, },
deep: true deep: true
}, },
// 监听到有变化,就缓存一下
sendText(newText){
this.currentSession.sendText = newText;
}
}, },
created() { created() {
...@@ -684,6 +688,7 @@ export default { ...@@ -684,6 +688,7 @@ export default {
this.currentToAccId = session.toAccId; this.currentToAccId = session.toAccId;
this.currentSession = session; this.currentSession = session;
this.currentSessionIndex = index; this.currentSessionIndex = index;
this.sendText = this.currentSession.sendText || '';
// 获取当前消息列表(最新的历史消息) // 获取当前消息列表(最新的历史消息)
this.getMSGHistory(this.currentSession); this.getMSGHistory(this.currentSession);
// 获取医生信息 // 获取医生信息
...@@ -738,6 +743,8 @@ export default { ...@@ -738,6 +743,8 @@ export default {
// this.currentSessionIndex = 0; // this.currentSessionIndex = 0;
this.currentSession = this.sessionListData.sessionList[cIndex]; this.currentSession = this.sessionListData.sessionList[cIndex];
this.currentSessionIndex = cIndex; this.currentSessionIndex = cIndex;
this.sendText = this.currentSession.sendText || '';
this.currentTaskLogId = this.currentSession.taskLogId; this.currentTaskLogId = this.currentSession.taskLogId;
this.currentToAccId = this.currentSession.toAccId; this.currentToAccId = this.currentSession.toAccId;
this.getDoctorInfo(this.currentToAccId); this.getDoctorInfo(this.currentToAccId);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册