🐞 fix(gvg): 修复gvg显示问题
This commit is contained in:
@@ -20,9 +20,10 @@ import { GVGUserTaskModel } from "../../db/GVGUserTask";
|
||||
import { getMyAuth } from "./gvgTeamService";
|
||||
import { pick } from "underscore";
|
||||
import { calFighterContribute, calProducerContribute } from "./gvgPrepareService";
|
||||
import { calVestigeLeagueBoxRewards } from "./gvgFightService";
|
||||
import { calVestigeLeagueBoxRewards, getFightTimeByPeriod } from "./gvgFightService";
|
||||
import { GVGVestigeLeagueRankModel } from "../../db/GVGVestigeLeagueRank";
|
||||
import { GVGVestigeSumRankModel } from "../../db/GVGVestigeSumRank";
|
||||
import { GVGTeamModel } from "../../db/GVGTeam";
|
||||
|
||||
// 定时器相关
|
||||
export async function createNewGVGConfig() {
|
||||
@@ -213,6 +214,7 @@ export async function getGVGInfoInGuild(roleId: string, guild: GuildType) {
|
||||
let hasLeague = !!guild.leagueCode;
|
||||
let serverId = guild.serverId;
|
||||
let { configId, period, countdownTime } = getGVGPeriodData();
|
||||
let { startFightTime, endFightTime } = getFightTimeByPeriod(period);
|
||||
let type = await getGVGServerType(serverId);
|
||||
|
||||
if(hasLeague && configId > 0) {
|
||||
@@ -223,11 +225,14 @@ export async function getGVGInfoInGuild(roleId: string, guild: GuildType) {
|
||||
applyCnt: await getApplyCnt(guild.leagueCode),
|
||||
...await getMainData(roleId, guild.leagueCode, configId, period, countdownTime, type),
|
||||
leagueDetailRank: await getLeagueRankBox(configId, guild.leagueCode, roleId),
|
||||
myTeamCnt: await GVGTeamModel.getTeamCntByRole(roleId),
|
||||
startFightTime, endFightTime
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
hasLeague,
|
||||
configId, period, countdownTime,
|
||||
startFightTime, endFightTime,
|
||||
type,
|
||||
invitationCnt: await getInviteCnt(guild.code)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user