From 1e1999112e6055c3d598093aa546282ebc8614f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=8F=E5=B0=98?= Date: Mon, 4 Nov 2019 13:51:16 +0800 Subject: [PATCH] core --- public/static/common/dist/js/examples.js | 32 ++---------------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/public/static/common/dist/js/examples.js b/public/static/common/dist/js/examples.js index c8b197d..d3b14d8 100644 --- a/public/static/common/dist/js/examples.js +++ b/public/static/common/dist/js/examples.js @@ -35,6 +35,7 @@ $(function () { status: status, kefu_code: code }, function (res) { + kefu.Message.setOnlineL(); if (res.code == 200 && res.data.length > 0) { if(status ==1){ $('#facing').html(''); @@ -99,7 +100,7 @@ $(function () { setOnlineL:function(){ $('#visitor_avatar').html(' '); $('#visitor_info h5').text(' '); - $('#visitor_info i').text(' '); + $('#visitor_info i').text(''); }, getfirstChatLog: function () { var show = $('.layout .content .chat .chat-body .show'); @@ -330,33 +331,4 @@ $(function () { } }); - // $(document).on('click', '.layout .content .chat .dropdown-item', function (e) { - // e.preventDefault(); - // - // }); - var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 - var isOpera = userAgent.indexOf("Opera") > -1; //判断是否Opera浏览器 - var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器 - var isIE11 = userAgent.indexOf("rv:11.0") > -1; //判断是否是IE11浏览器 - var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器 - if(!isIE && !isEdge && !isIE11) {//兼容chrome和firefox - var _beforeUnload_time = 0, _gap_time = 0; - var is_fireFox = navigator.userAgent.indexOf("Firefox") > -1;//是否是火狐浏览器 - window.onunload = function () { - _gap_time = new Date().getTime() - _beforeUnload_time; - if (_gap_time <= 5) { - //执行浏览器关闭你所要做的事情比如登出 - $.post('logout.do'); - } else {//浏览器刷新 - } - } - window.onbeforeunload = function () { - _beforeUnload_time = new Date().getTime(); - if (is_fireFox) {//火狐关闭执行 - //执行浏览器关闭你所要做的事情比如登出 - $.post('logout.do'); - } - }; - - } });