diff --git a/game-server/app/servers/activity/handler/signInHandler.ts b/game-server/app/servers/activity/handler/signInHandler.ts index e5d174ff1..f52d839f1 100644 --- a/game-server/app/servers/activity/handler/signInHandler.ts +++ b/game-server/app/servers/activity/handler/signInHandler.ts @@ -33,7 +33,7 @@ export class SignInHandler { const serverId = session.get('serverId'); let todayIndex = moment(new Date()).date(); - if (todayIndex < 5 || todayIndex > 24) {//未开启 + if (todayIndex < SIGNIN_OPEN || todayIndex > SIGNIN_CLOSE) {//未开启 return resResult(STATUS.ACTIVITY_CLOSED); } diff --git a/shared/consts/constModules/activityConst.ts b/shared/consts/constModules/activityConst.ts index fd8770214..128296d07 100644 --- a/shared/consts/constModules/activityConst.ts +++ b/shared/consts/constModules/activityConst.ts @@ -101,5 +101,5 @@ export const SIGNIN_VIP_OPEN_LIMIT = 15; export const DAILYRMBGIFTS_DAYS = 7;//一次性购买*天 //签到活动开启时间 -export const SIGNIN_OPEN = 5;//*号0点开启 -export const SIGNIN_CLOSE = 30;//*号晚上24点结束 \ No newline at end of file +export const SIGNIN_OPEN = 1;//*号0点开启 +export const SIGNIN_CLOSE = 31;//*号晚上24点结束 \ No newline at end of file diff --git a/shared/domain/activityField/signInField.ts b/shared/domain/activityField/signInField.ts index fb9fd6ad0..e378a56a0 100644 --- a/shared/domain/activityField/signInField.ts +++ b/shared/domain/activityField/signInField.ts @@ -1,10 +1,7 @@ import moment = require('moment'); -import { ACTIVITY_RESOURCES_TYPE } from '../../consts'; +import { ACTIVITY_RESOURCES_TYPE, SIGNIN_CLOSE, SIGNIN_OPEN } from '../../consts'; import { ActivityModelType } from '../../db/Activity'; import { ActivitySignInModelType } from '../../db/ActivitySignIn'; -import { RewardInter } from '../../pubUtils/interface'; -import { parseGoodStrWithType, parseHeroStrWithType } from '../../pubUtils/util'; -import { CreateHeroParam } from '../roleField/hero'; import { ActivityBase } from './activityField'; @@ -60,15 +57,15 @@ export class SignInData extends ActivityBase { public initData(data: string) { let date = new Date(); - this.beginTime = moment(date.setDate(5)).startOf('day').valueOf(); - this.endTime = moment(date.setDate(25)).endOf('day').valueOf(); + this.beginTime = moment(date.setDate(SIGNIN_OPEN)).startOf('day').valueOf(); + this.endTime = moment(date.setDate(SIGNIN_CLOSE)).endOf('day').valueOf(); let dataObj = JSON.parse(data); this.price = dataObj.price; this.productID = dataObj.productID; this.consume = dataObj.consume; this.roundIndex = moment().diff(moment(this.beginTime).startOf('months'), 'months') + 1; - this.todayIndex = moment(Date.now()).date() - 4; + this.todayIndex = moment(Date.now()).date() - SIGNIN_OPEN + 1; let arr = dataObj.data for (let obj of arr) {