mirror of
https://gitee.com/zhc02/timely_service.git
synced 2025-06-24 20:05:57 +08:00
core
This commit is contained in:
parent
c2ddfb9096
commit
1e1999112e
32
public/static/common/dist/js/examples.js
vendored
32
public/static/common/dist/js/examples.js
vendored
@ -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');
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user