活动:礼包商店添加刷新判断

This commit is contained in:
qiaoxin
2021-05-11 17:33:00 +08:00
parent df13e8181e
commit 1ed3c97675
3 changed files with 15 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ import { ACTIVITY_TYPE, FIRST_GIFT_STATE, STATUS } from '../../../consts';
import { newPlayerLimitPackageActivity, getPlayerLimitPackageData } from '../../../services/limitPackageService';
import { addReward, stringToRewardParam, useGiftPackage } from '../../../services/giftPackageService';
import { ActivityShopModel } from '../../../db/ActivityShop';
import moment = require('moment');
export default function (app: Application) {
return new limitPackageHandler(app);
@@ -59,7 +60,7 @@ export class limitPackageHandler {
switch (playerData.type) {
case ACTIVITY_TYPE.NEW_PLAYER_LIMIT_PACKAGE:
{
if (playerData.endTime < new Date) {
if (playerData.endTime < moment(new Date).valueOf()) {
return resResult(STATUS.ACTIVITY_NEW_PLAYER_LIMIT_PACKAGE_END);
}
break;