From a53ece5036c1fa61a63fe5f9e0cd3519210ab928 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Fri, 07 Aug 2026 09:44:27 +0800
Subject: [PATCH] feat:兼容分辨率低不出现滚动条
---
uniapps/work-app/src/utils/websocket.js | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/uniapps/work-app/src/utils/websocket.js b/uniapps/work-app/src/utils/websocket.js
index c9a5a2a..913dcc0 100644
--- a/uniapps/work-app/src/utils/websocket.js
+++ b/uniapps/work-app/src/utils/websocket.js
@@ -50,7 +50,7 @@
this.socketTask.onOpen(() => {
this.connected = true
// console.log('WebSocket已连接,userId:', this.userId)
- this.startPing()
+ // this.startPing()
if (this.onOpenCallback) {
this.onOpenCallback()
}
@@ -114,8 +114,8 @@
this.socketTask.send({
data: JSON.stringify(message),
success: () => {
- // console.log('WebSocket消息发送成功:', message)
- useGlobalWS();
+ console.log('WebSocket消息发送成功:', message)
+ // useGlobalWS();
},
fail: (error) => {
// console.error('WebSocket消息发送失败:', error)
@@ -124,15 +124,15 @@
}
// 开始心跳检测
- startPing() {
- this.stopPing()
- // 每25秒发送一次心跳
- this.pingTimer = setInterval(() => {
- if (this.connected) {
- this.send('ping', 'system')
- }
- }, 25000)
- }
+ // startPing() {
+ // this.stopPing()
+ // // 每25秒发送一次心跳
+ // this.pingTimer = setInterval(() => {
+ // if (this.connected) {
+ // this.send('ping', 'system')
+ // }
+ // }, 25000)
+ // }
// 停止心跳检测
stopPing() {
--
Gitblit v1.9.3