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 @@
正在加载数据中 ... - + 查看更多消息 ... - + 没有更多消息了