|
|
@@ -229,6 +229,10 @@ class Events
|
|
|
case 'getkfonlines':
|
|
|
Gateway::sendToCurrentClient(json_encode(self::getkfonlines(), 256));
|
|
|
break;
|
|
|
+ case 'kfgetuserinfo':
|
|
|
+ $tmp_id = isset($message['data']['id']) ? $message['data']['id'] : 0;
|
|
|
+ self::kfgetuserinfo($client_id, intval($tmp_id));
|
|
|
+ break;
|
|
|
case 'chatMessage':
|
|
|
$client = Gateway::getClientIdByUid($message['data']['to_id']);
|
|
|
if (!empty($client)) {
|
|
|
@@ -430,6 +434,15 @@ class Events
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //得到一个用户详细信息
|
|
|
+ public static function kfgetuserinfo($clientid, $id)
|
|
|
+ {
|
|
|
+ $ret = self::$db->select('*')->from('ws_account')->where('id=:id')->bindValues($id)->row();
|
|
|
+ Gateway::sendToClient($clientid, json_encode(['message_type' => 'userdetailinfo', 'data' => $ret]));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//获取在线客服列表
|
|
|
public static function getkfonlines()
|
|
|
{
|