From a2b2a2922cc22eb09c8445bf3c99c22763871b18 Mon Sep 17 00:00:00 2001 From: qiaoxin Date: Sat, 19 Jun 2021 15:56:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=EF=BC=9A=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/domain/activityField/signInField.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shared/domain/activityField/signInField.ts b/shared/domain/activityField/signInField.ts index e88768cf2..d757b49ce 100644 --- a/shared/domain/activityField/signInField.ts +++ b/shared/domain/activityField/signInField.ts @@ -82,7 +82,11 @@ export class SignInData extends ActivityBase { let date = new Date(); this.beginTime = moment(date.setDate(this.startDate)).startOf('day').add(REFRESH_TIME, 'h').valueOf(); - this.endTime = moment(date.setDate(this.endDate)).endOf('day').add(REFRESH_TIME, 'h').valueOf(); + if (this.startDate > this.endDate) {//跨度下个月 + this.endTime = moment(date.setDate(this.endDate)).endOf('day').add(REFRESH_TIME, 'h').add(1, 'month').valueOf(); + } else { + this.endTime = moment(date.setDate(this.endDate)).endOf('day').add(REFRESH_TIME, 'h').valueOf(); + } this.roundIndex = moment().diff(moment(SERVER_OPEN_TIME).startOf('months'), 'months') + 1; if (this.type === ACTIVITY_TYPE.NEW_PLAYER_SIGN_IN) { this.roundIndex = 1;