拍卖行:修改拍卖阶段判断,实现查看分红接口
This commit is contained in:
@@ -21,13 +21,10 @@ function getMaxPrice(gid: number, count: number) {
|
||||
|
||||
export function auctionStage() {
|
||||
const curTime = new Date().getTime();
|
||||
const todayGuildBegin = getNextTime(getTodayZeroDate(), AUCTION_TIME.GUILD_BEGIN_HOUR, AUCTION_TIME.GUILD_BEGIN_MIN).getTime();
|
||||
const todayWorldBegin = getNextTime(getTodayZeroDate(), AUCTION_TIME.WORLD_BEGIN_HOUR, AUCTION_TIME.WORLD_BEGIN_MIN).getTime();
|
||||
const todayWorldEnd = getNextTime(getTodayZeroDate(), AUCTION_TIME.WORLD_END_HOUR, AUCTION_TIME.WORLD_END_MIN).getTime();
|
||||
if (curTime < todayGuildBegin) return AUCTION_STAGE.DEFAULT;
|
||||
if (curTime < todayWorldBegin && curTime > todayGuildBegin) return AUCTION_STAGE.GUILD;
|
||||
if (curTime > todayWorldBegin && curTime < todayWorldEnd) return AUCTION_STAGE.WORLD;
|
||||
if (curTime > todayWorldEnd) return AUCTION_STAGE.END;
|
||||
if (curTime < todayGuildBegin().getTime()) return AUCTION_STAGE.DEFAULT;
|
||||
if (curTime < todayWorldBegin().getTime() && curTime > todayGuildBegin().getTime()) return AUCTION_STAGE.GUILD;
|
||||
if (curTime > todayWorldBegin().getTime() && curTime < todayWorldEnd().getTime()) return AUCTION_STAGE.WORLD;
|
||||
if (curTime > todayWorldEnd().getTime()) return AUCTION_STAGE.END;
|
||||
}
|
||||
|
||||
export function auctionBegin() {
|
||||
@@ -38,6 +35,18 @@ export function auctionEnd() {
|
||||
return getNextTime(new Date(), AUCTION_TIME.WORLD_END_HOUR, AUCTION_TIME.WORLD_END_MIN);
|
||||
}
|
||||
|
||||
export function todayGuildBegin() {
|
||||
return getNextTime(getTodayZeroDate(), AUCTION_TIME.GUILD_BEGIN_HOUR, AUCTION_TIME.GUILD_BEGIN_MIN);
|
||||
}
|
||||
|
||||
export function todayWorldBegin() {
|
||||
return getNextTime(getTodayZeroDate(), AUCTION_TIME.WORLD_BEGIN_HOUR, AUCTION_TIME.WORLD_BEGIN_MIN);
|
||||
}
|
||||
|
||||
export function todayWorldEnd() {
|
||||
return getNextTime(getTodayZeroDate(), AUCTION_TIME.WORLD_END_HOUR, AUCTION_TIME.WORLD_END_MIN);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 生成拍卖数据
|
||||
* @export
|
||||
|
||||
Reference in New Issue
Block a user