|
@@ -9,7 +9,7 @@ import { useRoom } from '/@/hooks/useRoom';
|
|
|
import { useI18n } from '/@/hooks/useI18n';
|
|
|
import dayjs from 'dayjs';
|
|
|
// 所有socket业务事件集中点
|
|
|
-const { t } = useI18n();
|
|
|
+
|
|
|
export function initSocketEvent(socket: SocketIOClient.Socket): void {
|
|
|
if (socket) {
|
|
|
socket.on('connect', () => {
|
|
@@ -66,7 +66,7 @@ export function initSocketEvent(socket: SocketIOClient.Socket): void {
|
|
|
console.error('onAny:-->', event);
|
|
|
});
|
|
|
socket.on('manager-error', ({ type, code }) => {
|
|
|
- debugger;
|
|
|
+ const { t } = useI18n();
|
|
|
switch (type) {
|
|
|
case 'repeat-login':
|
|
|
Dialog.toast({ content: t('action.errorRepeatLogin') });
|