统一推送格式

This commit is contained in:
luying
2020-12-30 11:03:45 +08:00
parent 3677d99d60
commit d6b4f1d62d
9 changed files with 44 additions and 40 deletions

View File

@@ -1,6 +1,8 @@
import { BackendSession, FrontendSession, pinus } from "pinus";
import { getGamedata } from "../pubUtils/gamedata";
import { RoleModel } from "../db/Role";
import { resResult } from "../pubUtils/util";
import { STATUS } from "../consts";
// 开启功能
export async function switchOnFunc(roleId: string, type: number, param: number, session: (BackendSession|FrontendSession)) {
@@ -19,7 +21,7 @@ export async function switchOnFunc(roleId: string, type: number, param: number,
if(funcs.length > 0) {
pinus.app.get('channelService').pushMessageByUids('onFuncSwitchOn', {funcs}, [{
pinus.app.get('channelService').pushMessageByUids('onFuncSwitchOn', resResult(STATUS.SUCCESS, {funcs}), [{
uid: roleId,
sid: sid
}]);