活动:修复糜家商队

This commit is contained in:
luying
2022-05-12 21:58:18 +08:00
parent 59402c8195
commit 72e166b0a4
2 changed files with 3 additions and 10 deletions

View File

@@ -1,8 +1,5 @@
import moment = require('moment');
import { SERVER_OPEN_TIME } from '../../consts';
import { ActivityModelType } from '../../db/Activity';
import { ActivitySelfServiceShopModelType } from '../../db/ActivitySelfServiceShop';
import { deltaDays } from '../../pubUtils/util';
import { ActivityBase } from './activityField';
// 自助商店数据坑位数据
@@ -53,7 +50,6 @@ export class SelfServiceShopItem {
// 自选商店
export class SelfServiceShopData extends ActivityBase {
list: Array<SelfServiceShopItem> = [];//货架
days: number = 20;//刷新周期天数
name: string = '';
count: number = 1;//每天可挑战次数胜利,才会统计
warid: string = '';//可挑战关卡
@@ -63,7 +59,6 @@ export class SelfServiceShopData extends ActivityBase {
challengeCount: number = 0;//挑战次数
unitBuyCount: number = 0;//元宝购买代币次数
roundIndex: number = 0; //第几周期 从1开始
public getItemByProductID(productID: string): SelfServiceShopItem {
let listIndex = this.list.findIndex(obj => { return obj.productID == productID });
@@ -86,7 +81,6 @@ export class SelfServiceShopData extends ActivityBase {
public initData(data: string) {
let dataObj = JSON.parse(data);
this.days = dataObj.days;
this.name = dataObj.name;
this.count = dataObj.count;
this.warid = dataObj.warid;
@@ -99,9 +93,6 @@ export class SelfServiceShopData extends ActivityBase {
for (let obj of arr) {
this.list.push(new SelfServiceShopItem(obj))
}
this.todayIndex = deltaDays(moment(SERVER_OPEN_TIME).startOf('d').toDate(), new Date) + 1;
this.roundIndex = Math.ceil(this.todayIndex / this.days);
}
constructor(activityData: ActivityModelType, createTime: number, serverTime: number) {