From 6baf992be878a220dc91bede4e5df4134859536d Mon Sep 17 00:00:00 2001 From: taoshihan1991 <630892807@qq.com> Date: Wed, 30 Sep 2020 16:33:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=83=E8=B7=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/chat-page.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/chat-page.js b/static/js/chat-page.js index f50cb92..18b7146 100644 --- a/static/js/chat-page.js +++ b/static/js/chat-page.js @@ -22,6 +22,8 @@ new Vue({ this.socket.onmessage = this.OnMessage; this.socket.onopen = this.OnOpen; this.socket.onclose = this.OnClose; + //心跳 + this.ping(); }, OnOpen() { this.chatTitle="连接成功!" @@ -370,7 +372,6 @@ new Vue({ this.scrollBottom(); //获取欢迎 this.getNotice(); - //心跳 - this.ping(); + } })