vali 6 년 전
부모
커밋
86f1c218f5
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13 0
      vendor/GatewayWorker_windows/Applications/whisper/Events.php

+ 13 - 0
vendor/GatewayWorker_windows/Applications/whisper/Events.php

@@ -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()
     {