mirror of
https://gitee.com/zhc02/timely_service.git
synced 2025-06-24 12:05:30 +08:00
core
This commit is contained in:
parent
54f3e5d9dd
commit
c6b7d7cf8e
@ -258,7 +258,11 @@ class Event
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 断开连接
|
||||||
|
* @param $fd 客户端标识
|
||||||
|
* @param $data 请求数据
|
||||||
|
*/
|
||||||
public static function disconnect($fd, $server)
|
public static function disconnect($fd, $server)
|
||||||
{
|
{
|
||||||
$uid = self::$online[$fd];
|
$uid = self::$online[$fd];
|
||||||
|
28
public/static/common/dist/js/examples.js
vendored
28
public/static/common/dist/js/examples.js
vendored
@ -194,7 +194,6 @@ $(function () {
|
|||||||
|
|
||||||
function onMessage(evt) {
|
function onMessage(evt) {
|
||||||
var obj = JSON.parse(evt.data);
|
var obj = JSON.parse(evt.data);
|
||||||
console.log(obj);
|
|
||||||
if (obj.cmd == "chatMessage") {
|
if (obj.cmd == "chatMessage") {
|
||||||
kefu.Message.toMeLog(obj.data);
|
kefu.Message.toMeLog(obj.data);
|
||||||
} else if (obj.cmd == "kefu_online") {
|
} else if (obj.cmd == "kefu_online") {
|
||||||
@ -241,10 +240,7 @@ $(function () {
|
|||||||
if (!content) {
|
if (!content) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
console.log($('.layout .content .sidebar-group #chats #facing .open-chat'));
|
|
||||||
|
|
||||||
msg.data = content;
|
msg.data = content;
|
||||||
console.log(msg)
|
|
||||||
websocket.send(JSON.stringify(msg));
|
websocket.send(JSON.stringify(msg));
|
||||||
$('#msg').val("");
|
$('#msg').val("");
|
||||||
return true;
|
return true;
|
||||||
@ -334,26 +330,10 @@ $(function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
$(document).on('click', '.layout .content .chat .dropdown-item', function (e) {
|
// $(document).on('click', '.layout .content .chat .dropdown-item', function (e) {
|
||||||
e.preventDefault();
|
// e.preventDefault();
|
||||||
console.log(111);
|
//
|
||||||
// if ($(this).hasClass('open-chat') == true) {
|
// });
|
||||||
// return true
|
|
||||||
// } else {
|
|
||||||
// $(this).addClass('open-chat');
|
|
||||||
// $(this).find('.users-list-body').find('.users-list-action').remove();
|
|
||||||
// $(this).find('figure').addClass('avatar-state-success');
|
|
||||||
// $('.layout .content .sidebar-group #friends #history li').not(this).removeClass('open-chat');
|
|
||||||
// $('.layout .content .sidebar-group #friends #history li figure').not($(this).find('figure')).removeClass('avatar-state-success');
|
|
||||||
// //显示当前用户的聊天记录
|
|
||||||
// kefu.Message.setOnline($(this).find('h5').text(), $(this).find('img').attr('src'));
|
|
||||||
// var vid = $(this).attr('data-id');
|
|
||||||
// var obj = $('.chat-body').find('.' + vid);
|
|
||||||
// kefu.Message.getChatLog(vid, kefu_code);
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
});
|
|
||||||
var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
|
var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
|
||||||
var isOpera = userAgent.indexOf("Opera") > -1; //判断是否Opera浏览器
|
var isOpera = userAgent.indexOf("Opera") > -1; //判断是否Opera浏览器
|
||||||
var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器
|
var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器
|
||||||
|
1
public/static/common/dist/js/user.js
vendored
1
public/static/common/dist/js/user.js
vendored
@ -136,7 +136,6 @@ $(function () {
|
|||||||
|
|
||||||
function onMessage(evt) {
|
function onMessage(evt) {
|
||||||
var obj = JSON.parse(evt.data);
|
var obj = JSON.parse(evt.data);
|
||||||
console.log(obj);
|
|
||||||
//上线成功 连接客服
|
//上线成功 连接客服
|
||||||
if (obj.cmd == 'online') {
|
if (obj.cmd == 'online') {
|
||||||
var msg = {};
|
var msg = {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user