From 1365e1af7814886a278d50629a7f3f6cb8386db0 Mon Sep 17 00:00:00 2001 From: taoshihan1991 <630892807@qq.com> Date: Tue, 28 Jul 2020 10:46:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E9=A2=98=E9=97=AA=E7=83=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/html/chat_page.html | 14 ++++++++++++-- static/html/index.html | 11 +++++++++++ static/js/functions.js | 15 +++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/static/html/chat_page.html b/static/html/chat_page.html index 0acde3f..0e4e965 100644 --- a/static/html/chat_page.html +++ b/static/html/chat_page.html @@ -183,7 +183,9 @@ this.saveHistory(content); this.scrollBottom(); + flashTitle();//标题闪烁 } + window.parent.postMessage(redata); }, //发送给客户 chatToUser() { @@ -378,11 +380,19 @@ } },5000); }, + //初始化 + init(){ + this.initCss(); + this.initConn(); + window.onfocus = function () { + clearTimeout(titleTimer); + document.title = originTitle; + }; + }, }, created: function () { - this.initCss(); - this.initConn(); + this.init(); this.getUserInfo(); //加载历史记录 this.getMesssagesByVisitorId(); diff --git a/static/html/index.html b/static/html/index.html index ebe6eca..8f8404a 100644 --- a/static/html/index.html +++ b/static/html/index.html @@ -8,6 +8,7 @@ +