perf: 消息已读

feature/task1.0.0__0514__ch
向文可 2 years ago
parent 4b6b030c0f
commit 02eabb7b2a

@ -161,6 +161,7 @@ const actions = {
case 25: // 收到消息 case 25: // 收到消息
if (session.id === state.currentSession) { if (session.id === state.currentSession) {
commit('setMessageList', [...state.messageList, content.content]); commit('setMessageList', [...state.messageList, content.content]);
dispatch('submitRead');
} else { } else {
dispatch('querySession'); dispatch('querySession');
} }

@ -137,12 +137,12 @@
const opts = computed(() => store.state.chat.opts); const opts = computed(() => store.state.chat.opts);
// //
const summaryVisible = ref(true); const summaryVisible = ref(false);
const summary = ref({ const summary = ref({
historyTimes: 96, historyTimes: 0,
historyCount: 88, historyCount: 0,
todayTimes: 10, todayTimes: 0,
todayCount: 8, todayCount: 0,
}); });
// //
@ -157,7 +157,7 @@
const handleChangeSession = (id) => { const handleChangeSession = (id) => {
store.commit('chat/setCurrentSession', id); store.commit('chat/setCurrentSession', id);
store.dispatch('chat/querySessionMessage'); store.dispatch('chat/querySessionMessage');
handleReadMessage(); store.dispatch('chat/submitRead');
}; };
// //
@ -176,9 +176,6 @@
proxy.$message.warning('发送消息不能为空'); proxy.$message.warning('发送消息不能为空');
} }
}; };
const handleReadMessage = () => {
store.dispatch('chat/submitRead');
};
// //
const transferVisible = ref(false); const transferVisible = ref(false);

Loading…
Cancel
Save