活动:删除多余代码

This commit is contained in:
qiaoxin
2021-05-28 15:23:16 +08:00
parent 750ebd7232
commit 480f8458f8
12 changed files with 24 additions and 158 deletions
@@ -41,7 +41,7 @@ export async function getPlayerTreasureHuntData(activityId: number, serverId: nu
let playerData = new TreasureHuntData(activityData);
playerData.beginTime = moment(huntBeginTime).valueOf();
playerData.endTime = moment(huntEndTime).valueOf();
playerData.todayIndex = deltaDays(huntBeginTime, new Date) + 1;;
playerData.todayIndex = deltaDays(moment(huntBeginTime).startOf('d').toDate(), new Date) + 1;;
playerData.roundIndex = huntRoundIndex;
let playerShopRecord: ActivityTreasureHuntShopModelType = await ActivityTreasureHuntShopModel.findTreasureData(serverId, activityId, roleId, huntRoundIndex, playerData.todayIndex);
@@ -55,7 +55,7 @@ export async function getPlayerTreasureHuntShopData(activityId: number, serverId
let playerData = new TreasureHuntData(activityData);
playerData.beginTime = moment(huntBeginTime).valueOf();
playerData.endTime = moment(huntEndTime).valueOf();
playerData.todayIndex = deltaDays(huntBeginTime, new Date) + 1;;
playerData.todayIndex = deltaDays(moment(huntBeginTime).startOf('d').toDate(), new Date) + 1;;
playerData.roundIndex = huntRoundIndex;
let playerShopRecord: ActivityTreasureHuntShopModelType = await ActivityTreasureHuntShopModel.findTreasureData(serverId, activityId, roleId, huntRoundIndex, playerData.todayIndex);