活动:重写七天乐活动的数据结构

This commit is contained in:
qiaoxin
2021-06-04 11:54:47 +08:00
parent f77de8eb78
commit d6134ce67e
12 changed files with 852 additions and 110 deletions

View File

@@ -120,10 +120,10 @@ export async function getPlayerSignInData(activityId: number, serverId: number,
let curDate = moment(createTime * 1000);
if (curDate.hour() < REFRESH_TIME) {
betinTime = moment(createTime * 1000).startOf('d').add(-1, 'd').add(REFRESH_TIME, 'h').toDate();
endTime = moment(betinTime).add(NEW_PLAYER_SIGIN_DAYS - 1, 'd').endOf('d').toDate()
endTime = moment(betinTime).add(NEW_PLAYER_SIGIN_DAYS, 'd').toDate()
} else {
betinTime = moment(createTime * 1000).startOf('d').add(REFRESH_TIME, 'h').toDate();
endTime = moment(betinTime).add(NEW_PLAYER_SIGIN_DAYS - 1, 'd').endOf('d').toDate()
endTime = moment(betinTime).add(NEW_PLAYER_SIGIN_DAYS, 'd').toDate()
}
playerData.setNewPlayerDate(betinTime, endTime)
}