活动:修改七天乐开启时间

This commit is contained in:
qiaoxin
2021-05-28 19:19:52 +08:00
parent 64e16935e1
commit 6adb33a41a
@@ -32,13 +32,16 @@ export class ActivityHandler {
* @memberof ActivityHandler
*/
async getAllOpenActivity(msg: { hid: number, lv: number }, session: BackendSession) {
const { hid, lv } = msg;
const { } = msg;
const roleId = session.get('roleId');
const serverId = session.get('serverId');
let test = true;
let playerActivityArray = [];
//七天乐活动-成长任务 1 2 3
{
let endTime = moment(SERVER_OPEN_TIME).startOf('d').add(7, 'd').toDate();
if (new Date() < endTime || test) {//开启中,开服7天后过期
let sevenData = [];
let growthData = await growthActivity(serverId, roleId);
if (growthData) {
@@ -72,8 +75,13 @@ export class ActivityHandler {
});
}
}
}
//14天乐活动-成长任务 1 2 3
{
let beginTime = moment(SERVER_OPEN_TIME).startOf('d').add(7, 'd').toDate();
let endTime = moment(SERVER_OPEN_TIME).startOf('d').add(7, 'd').toDate();
let curDate = new Date()
if (curDate > beginTime && curDate < endTime) {//开启中,开服7天后开启,开服第21天结束
let sevenData = [];
let growthData = await growthActivity(serverId, roleId);
if (growthData) {
@@ -107,6 +115,7 @@ export class ActivityHandler {
});
}
}
}
//签到 4
{
let data = await signInActivity(serverId, roleId);