mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat: 整合 sse 推送
This commit is contained in:
@ -5,6 +5,7 @@ import type { LayoutMode } from '@sa/materials';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { initWebSocket } from '@/utils/websocket';
|
||||
import { initSSE } from '@/utils/sse';
|
||||
import GlobalHeader from '../modules/global-header/index.vue';
|
||||
import GlobalSider from '../modules/global-sider/index.vue';
|
||||
import GlobalTab from '../modules/global-tab/index.vue';
|
||||
@ -105,6 +106,7 @@ function getSiderCollapsedWidth() {
|
||||
onMounted(() => {
|
||||
const protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://';
|
||||
initWebSocket(`${protocol + window.location.host + import.meta.env.VITE_APP_BASE_API}/resource/websocket`);
|
||||
initSSE(`${import.meta.env.VITE_APP_BASE_API}/resource/sse`);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -50,7 +50,7 @@ function logout() {
|
||||
positiveText: $t('common.confirm'),
|
||||
negativeText: $t('common.cancel'),
|
||||
onPositiveClick: () => {
|
||||
authStore.resetStore();
|
||||
authStore.logout();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user