活动:修改限购商店的刷新时间为5点

This commit is contained in:
qiaoxin
2021-05-28 17:20:18 +08:00
parent 480f8458f8
commit 6a2f7889ae
7 changed files with 58 additions and 21 deletions

View File

@@ -360,6 +360,7 @@ export const STATUS = {
ACTIVITY_NEED_PAY: { code: 50023, simStr: '客户端调错接口了' },
ACTIVITY_GOLD_RESOURCE: { code: 50024, simStr: '元宝资源' },
ACTIVITY_ID_ERROR: { code: 50025, simStr: 'id错误' },
ACTIVITY_NEW_PLAYER_GIFT_END: { code: 50026, simStr: '新手活动结束' },
// GM后台相关状态 60000 - 69999
GM_ERR_PASSWORD: { code: 60001, simStr: '账号或密码错误' },
GM_MISS_API: { code: 60002, simStr: '未找到该接口' },

View File

@@ -1,4 +1,5 @@
import moment = require('moment');
import { REFRESH_TIME } from '../../consts';
import { ActivityModelType } from '../../db/Activity';
import { ActivityShopModelType } from '../../db/ActivityShop';
import { ActivityBase } from './activityField';
@@ -71,6 +72,8 @@ export class LimitShopData extends ActivityBase {
let dataObj = JSON.parse(data);
this.name = dataObj.name;
this.interval = dataObj.interval;
this.beginTime = moment(this.beginTime).startOf('d').add(REFRESH_TIME, 'hour').valueOf();
if (this.interval > 0) {
this.roundIndex = Math.ceil((moment(new Date).valueOf() - this.beginTime) / (this.interval * 1000));
this.nextRefreshTime = moment(this.beginTime).add(this.interval * this.roundIndex, 'second').valueOf();

View File

@@ -17,6 +17,7 @@ export class RechargeMoneyItem {
this.id = data.id;
this.name = data.name;
this.reward = data.reward;
this.rewardTime = null;
}
}