You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
/*
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-05-10 20:50:54
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-05-18 14:45:49
|
|
|
|
* @Description: file content
|
|
|
|
*/
|
|
|
|
|
|
|
|
const MSG_TYPE = {
|
|
|
|
// 文本消息
|
|
|
|
TXT: 1,
|
|
|
|
// 语音消息
|
|
|
|
VOICE: 2,
|
|
|
|
// 图片消息
|
|
|
|
IMG: 3,
|
|
|
|
// 视频消息
|
|
|
|
VIDEO: 4,
|
|
|
|
// 自定义类型
|
|
|
|
CUSTOM : 6,
|
|
|
|
// 提示消息
|
|
|
|
TIP : 7
|
|
|
|
}
|
|
|
|
// 系统会话类型
|
|
|
|
const SYS_IO = {
|
|
|
|
// 连接心跳
|
|
|
|
HEART: 0,
|
|
|
|
// 获取会话列表
|
|
|
|
GET_SESSION_LIST: 1,
|
|
|
|
// 查询会话消息
|
|
|
|
GET_SESSION_MSG: 2,
|
|
|
|
// 发送消息
|
|
|
|
SEND_MSG: 3,
|
|
|
|
// 根据消息ID查询消息
|
|
|
|
GET_ID_MSG: 4,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
const KF_IO = {
|
|
|
|
// 会话心跳
|
|
|
|
HEART: 22,
|
|
|
|
// 给某个会话发送消息
|
|
|
|
SEND_MSG: 20,
|
|
|
|
// 创建会话
|
|
|
|
CRETAE_SEEION: 21,
|
|
|
|
}
|
|
|
|
export {
|
|
|
|
// 消息类型
|
|
|
|
MSG_TYPE,
|
|
|
|
SYS_IO,
|
|
|
|
KF_IO
|
|
|
|
}
|