后台socket接口

ws://chat.da.com:8420/

请求响应说明

```language --------------------common start--------------------- param { call_type : 3, // 0.心跳 1.用户连接 3.管理连接 暂时做管理员 } response code -9999 // 需要重新登录 --------------------common end--------------------- --------------------登录接口 start--------------------- param { api_key : 31000, call_type :3, token:'', } // 响应接口 response { api_key : 31000, data : { 'ix' : '', //client_id 'admin_list' : {}, // 客服列表 'guest_list' : {}, // 用户列表 'is_refresh' : 1, // 是否刷新token 'refresh_token' : '', //刷新的token }, code : 200, // >0成功// message: '', status : 'Success', } code -31001 解析token失败 -31002 管理员admin_id不存在 -31003 管理员被禁止登录或不存在 -31004 客服组被禁止或不存在 -31002 管理员admin_id不存在 --------------------登录接口 end---------------------- --------------------聊天列表接口 start--------------------- param { api_key : 32000, } // 响应接口 response { api_key : 32000, data : { 'ix' : '', //client_id 'admin_list' : {}, // 客服列表 'guest_list' : {}, // 用户列表 'is_refresh' : 1, // 是否刷新token 'refresh_token' : '', //刷新的token }, code : 200, // >0成功// message: '', status : 'Success', } response code --------------------聊天列表接口 end---------------------- --------------------聊天内容接口 start--------------------- param { api_key : 32100, gid :0, //用户id group_id : 0, // 客服组id page_index : 1, page_size : 10, } // 响应接口 response { api_key : 32100, data : { 'ix' : '', //client_id 'admin_list' : {}, // 客服列表 'guest_list' : {}, // 用户列表 'is_refresh' : 1, // 是否刷新token 'refresh_token' : '', //刷新的token }, code : 200, // >0成功// message: '', status : 'Success', } response code -32101 gid not null -32102 group_id not null --------------------聊天内容接口 end---------------------- --------------------刷新已读消息接口 start--------------------- param { api_key : 32200, gid :0, //用户id group_id : 0, // 客服组id } // 响应接口 response { api_key : 32200, data : { 'group_id' : 0, //client_id 'gid' : 0, // }, code : 200, // >0成功// message: '', status : 'Success', } response code -32201 gid not null -32202 group_id not null --------------------刷新已读消息接口 end---------------------- --------------------客服给用户发送消息 start--------------------- param { api_key : 32300, gid :0, //用户id msg: 0, // 消息 file_type : 0 // 文件类型 0.文字 1.图片 2.语音 3.商品 4.订单 5.视频 6.文件 } // 响应接口 response { api_key : 32300, data : { 'gid' : 0, //client_id 'message_info' : {}, // 消息内容 }, code : 200, // >0成功// message: '', status : 'Success', } response code -32301 gid not null -32302 msg not null 32399 用户发来信息 --------------------客服给用户发送消息 end---------------------- --------------------转接客服 start--------------------- param { api_key : 32400, gid :0, //用户id aix: 0, // 管理员标识 } // 响应接口 response { api_key : 32400, data : { 'gid' : 0, //client_id 'data' : {}, // 发送的信息 'guest_info' : {}, // 用户信息 'recs' : {} , // 最近聊天信息 }, code : 200, // >0成功// message: '', status : 'Success', } response code -32403 gid not null -32404 aix not null 32401 给接收的客服发一条客人上线通知, 及最近的对话记录 32402 给客服自己发一条转接成功的信息 --------------------转接客服 end---------------------- --------------------挂起和解除 start--------------------- param { api_key : 32500, status :0, // 0.解除 1.挂起 } // 响应接口 response { api_key : 32500, data : {}, code : 200, // >0成功// message: '', status : 'Success', } response code --------------------禁言及解除 end---------------------- --------------------在线客服管理员 start--------------------- param { api_key : 33000, } // 响应接口 response { api_key : 33000, data : {}, code : 200, // >0成功// message: '', status : 'Success', } response code --------------------禁言及解除 end---------------------- ```