聊天:加入部分假数据;加入一个服务器群推

This commit is contained in:
liangtongchuan
2021-03-07 21:25:36 +08:00
parent e0984cc932
commit ba70750f09
7 changed files with 126 additions and 15 deletions
+78 -1
View File
@@ -17,9 +17,86 @@ export const CHANNEL_PREFIX = {
GUILD: 'new_guild',
}
// 消息来源
export const MSG_SOURCE = {
ROLE_SEND_TEXT: 0,
PRIVATE_SEND_GIFT: 1,
HERO_QUALITY_UP: 2,
}
export const ON_MSG_ROUTE = 'onMessage';
export const ON_GROUP_MSG_ROUTE = 'onGroupMessage';
export const ON_ADD_CHANNEL_ROUTE = 'onAddChannel';
export const ON_LEAVE_CHANNEL_ROUTE = 'onLeaveChannel';
export const DEFAULT_MSG_PER_PAGE = 10;
export const DEFAULT_MSG_PER_PAGE = 10;
// 要放到策划表里的数据
export const RICH_TEXT_TABLE = [
{
id: 0,
jumpTo: '',
color: '#000000',
type: 'default'
},
{
id: 2,
jumpTo: 'hero',
color: '#ff0000',
type: 'hero'
},
{
id: 3,
jumpTo: 'equip',
color: '#112233',
type: 'equip'
},
{
id: 4,
jumpTo: 'refine',
color: '#aabbcc',
type: 'equip'
},
{
id: 5,
jumpTo: 'recurit',
color: '#aa0000',
type: 'link'
},
{
id: 6,
jumpTo: 'compose',
color: '#00aa00',
type: 'link'
}
];
export const BUBBLE_TABLE = [{
id: 1,
imgUrl: 'a.jpg',
name: '金牛'
}, {
id: 2,
imgUrl: 'b.jpg',
name: '白羊'
}];
export const SYS_EMOJI = [{
id: 1,
name: '大笑',
imgUrl: 'laugh.jpg',
group: 'zhaoyun',
index: 1
}, {
id: 2,
name: '大哭',
imgUrl: 'cry.jpg',
group: 'zhaoyun',
index: 2
}, {
id: 3,
name: '生气',
imgUrl: 'angry.jpg',
group: 'xiahou',
index: 1
}];
+2
View File
@@ -17,6 +17,8 @@ export default class GroupMessage extends BaseModel {
roomId: string; // 频道唯一 Id,由 channel 和 channelId 拼接:world_serverIdguild_guildId
@prop({ required: true, default: 0 })
type: number; // 消息类型:0,纯文本;1,富文本;2,表情
@prop({ required: true, default: 0 })
source: number; // 消息来源:0,玩家;1,玩家送礼;2,武将升品...
@prop({ required: true, default: '' })
roleId: string; // 消息发送者 roleId
+2
View File
@@ -12,6 +12,8 @@ export default class PrivateMessage extends BaseModel {
roomId: string; // 频道唯一 Id,由 roleId 和 targetRoleId 排序后拼接
@prop({ required: true, default: 0 })
type: number; // 消息类型:0,纯文本;1,富文本;2,表情
@prop({ required: true, default: 0 })
source: number; // 消息来源:0,玩家;1,玩家送礼;2,武将升品...
@prop({ required: true, default: '' })
roleId: string; // 消息发送者 roleId