红点:添加开始和结束推送
This commit is contained in:
@@ -35,6 +35,8 @@ export async function pushData(role: RoleType, session: FrontendOrBackendSession
|
|||||||
const { roleId, serverId, roleName, guildCode } = role;
|
const { roleId, serverId, roleName, guildCode } = role;
|
||||||
const sid = session.get('sid');
|
const sid = session.get('sid');
|
||||||
|
|
||||||
|
pushEntryStart(roleId, sid);
|
||||||
|
|
||||||
// // 商店
|
// // 商店
|
||||||
// const shop = await getAllShopList(roleId);
|
// const shop = await getAllShopList(roleId);
|
||||||
// pushEntryData('shop', roleId, sid, shop);
|
// pushEntryData('shop', roleId, sid, shop);
|
||||||
@@ -108,6 +110,7 @@ export async function pushData(role: RoleType, session: FrontendOrBackendSession
|
|||||||
// const battle = await getBattleListOfMain(role);
|
// const battle = await getBattleListOfMain(role);
|
||||||
// pushEntryData('battle', roleId, sid, battle);
|
// pushEntryData('battle', roleId, sid, battle);
|
||||||
|
|
||||||
|
pushEntryEnd(roleId, sid);
|
||||||
}catch(e) {
|
}catch(e) {
|
||||||
console.error(e.stack);
|
console.error(e.stack);
|
||||||
}
|
}
|
||||||
@@ -120,6 +123,16 @@ export async function pushData(role: RoleType, session: FrontendOrBackendSession
|
|||||||
pinus.app.channelService.pushMessageByUids('onEntryData', resResult(STATUS.SUCCESS, data), uids);//通知在线玩家练兵场重置,
|
pinus.app.channelService.pushMessageByUids('onEntryData', resResult(STATUS.SUCCESS, data), uids);//通知在线玩家练兵场重置,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function pushEntryStart(roleId: string, sid: string) {
|
||||||
|
let uids = [{ uid: roleId, sid }];
|
||||||
|
pinus.app.channelService.pushMessageByUids('onEntryDataStart', resResult(STATUS.SUCCESS), uids);//通知在线玩家练兵场重置,
|
||||||
|
}
|
||||||
|
|
||||||
|
function pushEntryEnd(roleId: string, sid: string) {
|
||||||
|
let uids = [{ uid: roleId, sid }];
|
||||||
|
pinus.app.channelService.pushMessageByUids('onEntryDataEnd', resResult(STATUS.SUCCESS), uids);//通知在线玩家练兵场重置,
|
||||||
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 镇念塔初始数据
|
// * 镇念塔初始数据
|
||||||
// * @param role
|
// * @param role
|
||||||
|
|||||||
Reference in New Issue
Block a user