From 87ca206b2bfad461cfb33ed1a01ad3dceea4e3a8 Mon Sep 17 00:00:00 2001 From: wangyifeng <812766448@qq.com> Date: Mon, 7 Apr 2025 14:10:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=81=8A=E5=A4=A9=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E4=B8=8D=E8=B6=B3=E4=B8=80=E5=B1=8F=E6=97=B6=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=8A=A0=E8=BD=BD=E6=9B=B4=E5=A4=9A=E8=81=8A=E5=A4=A9?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=95=B0=E6=8D=AE=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9B=E6=96=B0=E5=A2=9E=E6=8E=A5=E6=94=B6OA=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=A4=B4=E5=83=8F=E5=90=8C=E6=AD=A5=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E8=81=8A=E5=A4=A9=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 8 +++++++- src/pages/dialog/index.vue | 7 ++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main.js b/src/main.js index 94ae8fe..e4cf021 100644 --- a/src/main.js +++ b/src/main.js @@ -16,7 +16,8 @@ import { vLoading } from '@/components/x-loading/index.js' import messagePopup from '@/components/x-message/useMessagePopup' import pageAnimation from '@/components/page-animation/index.vue' import * as plugins from './plugins' -import { useDialogueStore, useTalkStore } from '@/store' +import { useDialogueStore, useTalkStore, useUserStore } from '@/store' + const { showMessage } = messagePopup() dayjs.locale('zh-cn') if (import.meta.env.VITE_SHOW_CONSOLE === 'true') { @@ -84,6 +85,11 @@ export function createApp() { talkStore.toTalk(pushMsg?.payload?.talk_type, pushMsg?.payload?.receiver_id) } + //处理当用户信息发生变化时,更新用户信息 + window.updateUserInfo = () => { + useUserStore().loadSetting() + } + window.message = ['success', 'error', 'warning'].reduce((acc, type) => { acc[type] = (message) => { if (typeof message === 'string') { diff --git a/src/pages/dialog/index.vue b/src/pages/dialog/index.vue index c1a8dc3..05fb428 100644 --- a/src/pages/dialog/index.vue +++ b/src/pages/dialog/index.vue @@ -3,7 +3,8 @@
正在加载数据中 ... - + 查看更多消息 ... - + 没有更多消息了