时间问题
This commit is contained in:
@@ -68,7 +68,7 @@ export class FirstGiftPage {
|
||||
public setPlayerRecord(playerData: ActivityFirstGiftModelType) {
|
||||
if(playerData) {
|
||||
this.state = FIRST_GIFT_STATE.PAY;
|
||||
this.todayIndex = deltaDays(moment(playerData.createdAt).startOf('d').toDate(), new Date) + 1;
|
||||
this.todayIndex = deltaDays(playerData.createdAt, new Date, true) + 1;
|
||||
|
||||
let daysNum = playerData.days||[];
|
||||
for (let obj of this.items) {
|
||||
|
||||
@@ -65,8 +65,8 @@ export class MonthlyTicketData extends ActivityBase {
|
||||
this.cardEndTime = data.isForever? this.endTime: moment(data.endTime).valueOf();
|
||||
if (data.isForever || moment(new Date).valueOf() < this.cardEndTime) {
|
||||
this.isOpen = true;
|
||||
this.todayIndex = deltaDays(moment(data.createdAt).startOf('d').add(REFRESH_TIME, 'h').toDate(), new Date) + 1;
|
||||
this.days = deltaDays(moment(data.createdAt).startOf('d').add(REFRESH_TIME, 'h').toDate(), new Date(this.cardEndTime));
|
||||
this.todayIndex = deltaDays(data.createdAt, new Date) + 1;
|
||||
this.days = deltaDays(data.createdAt, new Date(this.cardEndTime));
|
||||
} else {
|
||||
this.todayIndex = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user