推送:添加等级推送
This commit is contained in:
@@ -6,7 +6,7 @@ import { recentGuildMsgs, recentPrivateChatInfos, recentSysMsgs, recentWorldMsgs
|
|||||||
import { getCurTask, getPvpTask } from './taskService';
|
import { getCurTask, getPvpTask } from './taskService';
|
||||||
|
|
||||||
import { RoleType } from '../db/Role';
|
import { RoleType } from '../db/Role';
|
||||||
import { Application, FrontendOrBackendSession, pinus } from 'pinus';
|
import { Application, FrontendOrBackendSession, pinus, RpcClient } from 'pinus';
|
||||||
import { resResult } from '../pubUtils/util';
|
import { resResult } from '../pubUtils/util';
|
||||||
import { STATUS, PUSH_BATCH, PUSH_INTERVAL, CONSUME_TYPE } from '../consts';
|
import { STATUS, PUSH_BATCH, PUSH_INTERVAL, CONSUME_TYPE } from '../consts';
|
||||||
import { getAllShopList } from './shopService';
|
import { getAllShopList } from './shopService';
|
||||||
@@ -46,7 +46,7 @@ export async function pushData(role: RoleType, session: FrontendOrBackendSession
|
|||||||
pushEntryStart(roleId, sid);
|
pushEntryStart(roleId, sid);
|
||||||
// 军团
|
// 军团
|
||||||
const guildData = await getGuildEntryData(role, sid, session);
|
const guildData = await getGuildEntryData(role, sid, session);
|
||||||
let modules = ['battle', 'rank', 'mail', 'friend', 'daily', 'expedition', 'tower', 'comBattle', 'dungeon', 'pvp', 'gacha', 'school', 'task', 'chat', 'event', 'guild'];
|
let modules = ['lv', 'battle', 'rank', 'mail', 'friend', 'daily', 'expedition', 'tower', 'comBattle', 'dungeon', 'pvp', 'gacha', 'school', 'task', 'chat', 'event', 'guild'];
|
||||||
if (guildData.hasGuild) {
|
if (guildData.hasGuild) {
|
||||||
modules.push('auction', 'train', 'boss', 'wishPool', 'guildActivity', 'donate');
|
modules.push('auction', 'train', 'boss', 'wishPool', 'guildActivity', 'donate');
|
||||||
}
|
}
|
||||||
@@ -75,6 +75,8 @@ async function getModuleData(type: string, data: { role: RoleType, session: Fron
|
|||||||
const { roleId, serverId, roleName, guildCode } = role;
|
const { roleId, serverId, roleName, guildCode } = role;
|
||||||
let { hasGuild, guild, userGuild, guildResult } = guildData;
|
let { hasGuild, guild, userGuild, guildResult } = guildData;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case 'lv':
|
||||||
|
return role.lv;
|
||||||
case 'shop': // 商店
|
case 'shop': // 商店
|
||||||
return await getAllShopList(roleId);
|
return await getAllShopList(roleId);
|
||||||
case 'rank': // 排名
|
case 'rank': // 排名
|
||||||
|
|||||||
Reference in New Issue
Block a user