From 6b0ab88c9ec4b450ed8bc2588bc1f818e25a260e Mon Sep 17 00:00:00 2001 From: songjvcheng Date: Wed, 6 Aug 2025 13:46:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=9A=90=E8=97=8F=E9=80=9A?= =?UTF-8?q?=E8=AF=9D=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/index.js b/src/index.js index 200226e..7d6af39 100644 --- a/src/index.js +++ b/src/index.js @@ -857,6 +857,9 @@ class WebRTCChat { try { // 显示等待连接提示 this.showConnectionWaiting(); + + // 立即隐藏开始通话按钮 + this.startButton.style.display = 'none'; // 切换到通话中图标 this.switchToCallingIcon(); @@ -903,6 +906,7 @@ class WebRTCChat { this.hideConnectionWaiting(); } catch (error) { + this.startButton.style.display = 'block'; // 如果出错,隐藏等待连接提示并恢复到默认图标 this.hideConnectionWaiting(); this.switchToDefaultIcon(); @@ -953,6 +957,8 @@ class WebRTCChat { console.log('通话已结束,5秒后刷新页面清除缓存...'); setTimeout(() => { window.location.reload(); + this.startButton.style.display = 'block'; + this.startButton.disabled = false; }, 2000); }