From 14687adb46961dcbb01a497ec209050a10748cf3 Mon Sep 17 00:00:00 2001 From: yangzhe Date: Tue, 9 Dec 2025 16:52:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B8=85=E7=A9=BA=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=81=BF=E5=85=8D=E6=97=A7=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=B9=B2=E6=89=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- store/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/store/index.js b/store/index.js index 2e440d1..fd726f0 100644 --- a/store/index.js +++ b/store/index.js @@ -273,6 +273,9 @@ const store = new Vuex.Store({ user && typeof user.attempt === "number" ? user.attempt : 1; if (!friendId) return Promise.reject(new Error("缺少 friendId")); + // 清空消息列表,避免旧消息干扰 + commit("push_MsgList", []); + // 第一步:获取列表(复用现有 action,保证 state 同步更新) const list = await dispatch("getUserlist");