时间:整理时间方法
This commit is contained in:
@@ -2,7 +2,7 @@ import { ActivityModelType } from '../../db/Activity';
|
||||
import { ActivityBase } from './activityField';
|
||||
import { prop } from '@typegoose/typegoose';
|
||||
import { UserGachaType } from '../../db/UserGacha';
|
||||
import { getAfterDateByDay } from '../../pubUtils/timeUtil';
|
||||
import { getTimeFun } from '../../pubUtils/timeUtil';
|
||||
import { DicGacha } from '../../pubUtils/dictionary/DicGacha';
|
||||
import { GACHA_OCCUPY_HID } from '../../consts';
|
||||
import { gameData } from '../../pubUtils/data';
|
||||
@@ -31,7 +31,8 @@ export class GachaData extends ActivityBase {
|
||||
this.pickHero = userGacha.pickHero;
|
||||
this.freeCount = userGacha.freeCount;
|
||||
if(dicGacha.free.count > 0) {
|
||||
this.refFreeTime = getAfterDateByDay(userGacha.refFreeTime, dicGacha.free.day);
|
||||
let f = getTimeFun(userGacha.refFreeTime);
|
||||
this.refFreeTime = <number>f.getAfterDayWithHour(dicGacha.free.day);
|
||||
}
|
||||
this.count = userGacha.count;
|
||||
this.floor = userGacha.floor;
|
||||
@@ -97,7 +98,8 @@ export class GachaListReturn {
|
||||
if(userGacha) {
|
||||
this.freeCount = userGacha.freeCount;
|
||||
if(dicGacha.free.count > 0) {
|
||||
this.refFreeTime = getAfterDateByDay(userGacha.refFreeTime, dicGacha.free.day);
|
||||
let f = getTimeFun(userGacha.refFreeTime);
|
||||
this.refFreeTime = <number>f.getAfterDayWithHour(dicGacha.free.day);
|
||||
}
|
||||
this.count = userGacha.count;
|
||||
this.floor = getFloorStatus(dicGacha.id, userGacha.floor);
|
||||
|
||||
Reference in New Issue
Block a user