统一前端共享工具入口

This commit is contained in:
yml
2026-06-09 20:50:57 +08:00
parent 684e30862d
commit 60324765c5
69 changed files with 106 additions and 1142 deletions
@@ -1,6 +1,6 @@
import { onBeforeUnmount, ref, type Ref } from 'vue'
import { refreshAccessToken } from '@/shared/api/client'
import { getAccessToken, type AuthScope } from '@/utils/authStorage'
import { getAccessToken, type AuthScope } from '@/shared/utils/authStorage'
export interface SSEMessage {
id: number
@@ -15,7 +15,7 @@ import { uploadFile } from '@/shared/api/files'
import ChatAttachmentImage from '@/components/ChatAttachmentImage.vue'
import { useChatSSE, type ChatEvent } from '@/features/chats/composables/useChatSSE'
import { useDesktopNotification } from '@/features/chats/composables/useDesktopNotification'
import { formatDateMinute } from '@/utils/time'
import { formatDateMinute } from '@/shared/utils/time'
const currentUserId = Number(localStorage.getItem('user_id') || 0)
@@ -7,7 +7,7 @@ import { fetchChats, type ChatConversation } from '@/features/chats/api/chats'
import { useChatSSE, type ChatEvent } from '@/features/chats/composables/useChatSSE'
import { useDesktopNotification } from '@/features/chats/composables/useDesktopNotification'
import NotificationSettings from '@/features/chats/components/NotificationSettings.vue'
import { formatDateMinute } from '@/utils/time'
import { formatDateMinute } from '@/shared/utils/time'
const router = useRouter()
const currentUserId = Number(localStorage.getItem('user_id') || 0)
@@ -14,7 +14,7 @@ import { uploadFile } from '@/shared/api/files'
import ChatAttachmentImage from '@/components/ChatAttachmentImage.vue'
import { useChatSSE, type ChatEvent } from '@/features/chats/composables/useChatSSE'
import { useDesktopNotification } from '@/features/chats/composables/useDesktopNotification'
import { formatDateMinute } from '@/utils/time'
import { formatDateMinute } from '@/shared/utils/time'
const currentUserId = Number(localStorage.getItem('user_id') || 0)
@@ -4,7 +4,7 @@ import { useRouter } from 'vue-router'
import { showToast } from 'vant'
import MobileBottomNav from '@/components/MobileBottomNav.vue'
import { fetchChats, type ChatConversation } from '@/features/chats/api/chats'
import { formatDateMinute } from '@/utils/time'
import { formatDateMinute } from '@/shared/utils/time'
const router = useRouter()
const loading = ref(false)