聊天:添加屏蔽

This commit is contained in:
luying
2021-11-10 17:28:11 +08:00
parent b15a9088e8
commit 32fe508625
16 changed files with 260 additions and 54 deletions

View File

@@ -23,13 +23,33 @@ export const CHANNEL_PREFIX = {
WORLD_AUCTION: 'w_auction', // 军团拍卖
}
export const CHANNEL_TYPE = new Map([
[ CHANNEL_PREFIX.SYS, 1 ],
[ CHANNEL_PREFIX.WORLD, 2 ],
[ CHANNEL_PREFIX.GUILD, 3 ],
[ CHANNEL_PREFIX.TEAM, 4 ],
[ 'private', 5 ],
]);
export const getChannelType = function(prefix: string) {
switch(prefix) {
case CHANNEL_PREFIX.SYS:
return 1;
case CHANNEL_PREFIX.WORLD:
return 2;
case CHANNEL_PREFIX.GUILD:
return 3;
case CHANNEL_PREFIX.TEAM:
return 4;
case 'private':
return 5;
}
}
export const getSdkChannelId = function(prefix: string) {
switch(prefix) {
case CHANNEL_PREFIX.WORLD:
return 1;
case CHANNEL_PREFIX.GUILD:
return 4;
case CHANNEL_PREFIX.TEAM:
return 3;
case 'private':
return 2;
}
}
// 消息来源
export const MSG_SOURCE = {

View File

@@ -13,7 +13,8 @@ export enum BANTU_VID_ADDR {
export const BANTU_VID_APP_KEY = '05c1c495369769e3c5d98426e9c8c2c0';
export enum SDK_37_ADDR {
LOGIN = 'https://apimyh5.37.com/index.php?c=sdk-unified&a=validate'
LOGIN = 'https://apimyh5.37.com/index.php?c=sdk-unified&a=validate',
CHECK_CHAT = 'http://api.gamechat.37.com/checkChatV2.php'
}
export enum SDK_37_CONST {
GAME_ID = 165, // 研发使用的GAME_ID