设置倍速

This commit is contained in:
yanghang
2025-07-02 11:04:58 +08:00
parent bf638b894c
commit 58adee173b
9 changed files with 617 additions and 68 deletions
+4 -4
View File
@@ -1,3 +1,6 @@
import { goto_login_fun } from '@/api/request'
export default class WebSocketUtil {
/**
* WebSocket工具类,用于管理WebSocket连接
@@ -113,10 +116,6 @@ export default class WebSocketUtil {
triggerEvent(event, data) {
if (this.callbacks[event]) {
this.callbacks[event].forEach(callback => callback(data));
uni.$emit('socketEvent',{
type: event,
data
})
}
}
@@ -201,6 +200,7 @@ export default class WebSocketUtil {
} else {
console.error('达到最大重连次数,停止尝试');
this.triggerEvent('error', new Error('达到最大重连次数'));
goto_login_fun()
}
}