pvp:添加PVP任务

This commit is contained in:
luying
2021-10-29 16:36:23 +08:00
parent 2cf5895c52
commit 0d0855d312
9 changed files with 120 additions and 9 deletions
+4 -2
View File
@@ -3,7 +3,7 @@
*/
import { getMails } from './mailService';
import { recentGuildMsgs, recentPrivateChatInfos, recentSysMsgs, recentWorldMsgs } from './chatService';
import { getCurTask } from './taskService';
import { getCurTask, getPvpTask } from './taskService';
import { RoleType } from '../db/Role';
import { Application, FrontendOrBackendSession, pinus } from 'pinus';
@@ -128,7 +128,9 @@ async function getModuleData(type: string, data: { role: RoleType, session: Fron
return { receiveBoxs, donateFund, reports, donateCnt: donateCnt || 0, donationLv };
}
case 'task':
return await getCurTask(role.roleId, session);
let tasks = await getCurTask(role.roleId, session);
let pvpTask = await getPvpTask(role.roleId);
return {...tasks, pvpTask}
case 'chat':
const worldMsgs = await recentWorldMsgs(serverId);
const sysMsgs = await recentSysMsgs(serverId);