optimize(projects): 优化系统代码质量

This commit is contained in:
xlsea
2025-11-19 18:10:11 +08:00
parent e49427eba1
commit 18fd596183
7 changed files with 90 additions and 147 deletions
+6 -2
View File
@@ -4,8 +4,12 @@ import useNoticeStore from '@/store/modules/notice';
import { $t } from '@/locales';
import { localStg } from './storage';
// 初始化
export const initSSE = (url: any) => {
/**
* 初始化 SSE
*
* @param url - SSE 地址
*/
export const initSSE = (url: string) => {
const token = localStg.get('token');
if (import.meta.env.VITE_APP_SSE === 'N' || !token) {
return;