统一前端错误读取和调试日志
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import type { ChatEvent } from './useChatSSE'
|
||||
import { debugError } from '@/shared/utils/debug'
|
||||
|
||||
export type NotificationPermission = 'default' | 'granted' | 'denied'
|
||||
|
||||
@@ -119,7 +120,7 @@ export function useDesktopNotification(scope: 'user' | 'admin') {
|
||||
notification.close()
|
||||
}, 5000)
|
||||
} catch (error) {
|
||||
console.error('Failed to show notification:', error)
|
||||
debugError('桌面通知发送失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,6 +206,6 @@ function speakText(text: string) {
|
||||
utterance.volume = 1
|
||||
window.speechSynthesis.speak(utterance)
|
||||
} catch (error) {
|
||||
console.error('Failed to speak notification:', error)
|
||||
debugError('语音提醒播放失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user