吉安感知网项目-前端
张含笑
2026-02-24 1658ae4302ca926a9764dfd6234575c285744903
feat:去掉心跳
1 files modified
21 ■■■■ changed files
applications/mobile-web-view/src/appPages/voiceCallDetail/index.vue 21 ●●●● patch | view | raw | blame | history
applications/mobile-web-view/src/appPages/voiceCallDetail/index.vue
@@ -146,13 +146,13 @@
// 心跳
let pingTimer = null
function startPing() {
    stopPing()
    // 每 25 秒发一次 ping(你后端有 PING/PONG)
    pingTimer = setInterval(() => {
        if (connected.value) send('ping', 'system', null)
    }, 25000)
}
// function startPing() {
//     stopPing()
//     // 每 25 秒发一次 ping(你后端有 PING/PONG)
//     pingTimer = setInterval(() => {
//         if (connected.value) send('ping', 'system', null)
//     }, 25000)
// }
function stopPing() {
    if (pingTimer) clearInterval(pingTimer)
@@ -411,7 +411,7 @@
    ws.onopen = () => {
        connected.value = true
        log('WS 已连接 userId=', uid.value)
        startPing()
        // startPing()
    }
    ws.onclose = () => {
@@ -605,8 +605,6 @@
            if (contact.userId) {
                peerUid.value = contact.userId
                contactName.value = contact.nickName || '未知联系人'
                // log('🔗 从contact参数获取peerUid:', peerUid.value)
                // log('👤 联系人名称:', contactName.value)
            }
        } catch (e) {
            log('❌ 解析contact参数失败:', String(e))
@@ -670,7 +668,7 @@
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
    height: 100vh;
    height: 100%;
    justify-content: center;
    align-items: center;
}
@@ -872,6 +870,7 @@
/* 头像样式 */
.contactAvatar {
    margin-top: 150px;
    width: 180px;
    height: 180px;
    display: flex;