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

重新获取数据等

上级 90afb452
......@@ -175,6 +175,7 @@ import { getPicaKFAccid, getPhomeDemain } from "@/utils";
import UserInfo from "@/components/IM/user-info.vue";
const CONTAINER_HEIGHT = 700;
let forwardMsgIntervalId = null;
let sessionIntervalId = null;
let vm = null;
export default {
......@@ -231,6 +232,10 @@ export default {
this.picakfAccId = getPicaKFAccid();
this.kfAvatar = require("../../../assets/image/IM/kf-avatar.png");
this.getSessionList();
sessionIntervalId && clearInterval(sessionIntervalId);
sessionIntervalId = setInterval( () => {
this.getSessionList();
}, 10000)
this.getFiveContentList();
},
......@@ -521,16 +526,13 @@ export default {
this.currentSessionIndex = 0;
this.currentTaskLogId = this.currentSession.id;
this.currentToAccId = this.currentSession.toAccId;
// this.realTimestamp = this.sessionListData.sessionList[
// sLength - 1
// ].lastMsgTime;
this.getDoctorInfo(this.currentToAccId);
this.getMSGHistory(this.currentSession);
}
if (sLength) {
this.convertSessions(this.sessionListData.sessionList);
this.$forceUpdate();
console.log("this.currentSession", this.currentSession);
this.getMSGHistory(this.currentSession);
this.getDoctorInfo(this.currentToAccId);
}
} else {
this.$message({
......@@ -766,6 +768,7 @@ export default {
beforeDestroy() {
console.log("in beforeDestroy", forwardMsgIntervalId);
sessionIntervalId && clearInterval(sessionIntervalId);
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId);
console.log("in beforeDestroy", forwardMsgIntervalId);
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册