活动:修复间隔天数位数
This commit is contained in:
@@ -33,7 +33,6 @@ export class ShopItem {
|
||||
// 商店数据
|
||||
export class LimitShopData extends ActivityBase {
|
||||
name: string = '';//活动名称
|
||||
interval: number = 0;//周期间隔(秒)
|
||||
list: Array<ShopItem> = [];//商品列表
|
||||
// nextRefreshTime: number;//下次刷新时间
|
||||
// roundIndex: number = 1;//周期数从1开始
|
||||
@@ -76,14 +75,7 @@ export class LimitShopData extends ActivityBase {
|
||||
// this.nextRefreshTime = this.endTime;
|
||||
let dataObj = JSON.parse(data);
|
||||
this.name = dataObj.name;
|
||||
this.interval = dataObj.interval * 864000;
|
||||
|
||||
// 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();
|
||||
// }
|
||||
// console.log('ddddddddddddbbbbbbb', moment(new Date).valueOf(), moment(this.beginTime).valueOf(), this.roundIndex,)
|
||||
let arr = dataObj.data;
|
||||
for (let obj of arr) {
|
||||
this.list.push(new ShopItem(obj))
|
||||
|
||||
Reference in New Issue
Block a user